Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
Employee

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!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
mahoneypat
Employee
Employee

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.