cancel
Showing results for 
Search instead for 
Did you mean: 
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
Microsoft
Microsoft

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
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors