cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bourne2000
Helper V
Helper V

Duration column is not coming properly in the Power BI

Hi

 

My data source in google sheet and my data column like talk time

 

However, when I tried to connect to Power BI, I am getting this error. I tried to format the column in google sheet into duration and text but had no success

 

this is my original data in the google sheet

 

bourne2000_0-1641940216484.png

 

Error in Power BI

 

bourne2000_1-1641940232747.png

 

Please advise

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft
Microsoft

One way to do that would be to convert that column to text type, and then add a custom column with this expression (returns days in decimal form). From there, convert that new column to decimal and load it. See this article for best practices on how to deal with durations from there.

Calculate and Format Durations in DAX – Hoosier BI

 

= let
inputlist = Text.Split([Duration], ":"),
numberlist = List.Transform(inputlist, each Number.FromText(_)),
minutes = numberlist{0} * 60 + numberlist{1} + numberlist{2}/60
in
minutes/(60*24)





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
smpa01
Super User
Super User

@bourne2000  I think you need to create a duplicate column in Google Sheet that would be a text version of

[Wrap Up Time] and then you are going to get the text version of that column





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


mahoneypat
Microsoft
Microsoft

One way to do that would be to convert that column to text type, and then add a custom column with this expression (returns days in decimal form). From there, convert that new column to decimal and load it. See this article for best practices on how to deal with durations from there.

Calculate and Format Durations in DAX – Hoosier BI

 

= let
inputlist = Text.Split([Duration], ":"),
numberlist = List.Transform(inputlist, each Number.FromText(_)),
minutes = numberlist{0} * 60 + numberlist{1} + numberlist{2}/60
in
minutes/(60*24)





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors