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
tiagotas
Helper I
Helper I

View and add up to 24 hours!

I need to create a panel where I visualize the sum of hours worked, and these hours are mostly over 24 hours. Ex: 36:00 hours. Can I use this format in Power Bi?

1 ACCEPTED SOLUTION
ImkeF
Super User
Super User

Yes, you split that field by the separator: ":" into 2 fields: First "Hours", second "Minutes". Perform all aggregations and transformations on these 2 fields separately before in the last step, you add them together again to create the total field, this time in a decimal format.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

2 REPLIES 2
v-caliao-msft
Employee
Employee

Hi @tiagotas,

 

In your scenario, you can use DATEDIFF function to get the total hours for each employee, this value can exceed 24 hours.

Reference
https://msdn.microsoft.com/en-us/library/dn802538.aspx

 

If this is not what you want, please provide us some sample data and expected result, so that we can make further analysis.

 

Regards,

Charlie Liao

 

ImkeF
Super User
Super User

Yes, you split that field by the separator: ":" into 2 fields: First "Hours", second "Minutes". Perform all aggregations and transformations on these 2 fields separately before in the last step, you add them together again to create the total field, this time in a decimal format.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

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.