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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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