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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
NiekHacquebord
Frequent Visitor

Summing time values in a table

Hi all,

 

I am relatively new to Power BI and need help with the following:

I have a dataset in Excel that shows me why a machine was malfunctioning. For each malfunction, I have the reason for malfunctioning ("Reason), a starting time ("Van"), and an ending time ("Tot"). Based on those times, I calculate the duration in Excel as "Tot" minus "Van". The duration is of data type "time" (hh:mm:ss). See also the screenshot below.

data.PNG

 

I would like to produce a visual that aggregates the total malfunction time for each "Reason" (as in a PivotTable in Excel). In other words, for above screenshot, the resulting table would need to show this:

 

NiekHacquebord_0-1628589975092.png

 

 

However, when I try to do that with a table visual in Power BI, this is what I get as a result. Does anyone know how to resolve this?

NiekHacquebord_1-1628590194517.png

Thanks in advance!

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi,  @NiekHacquebord 

You need to  create a measure to replace you original column field as below:

 

Measure_Duration = SUM('Table'[Duration])

 

Then change the format of measure as below:

51.png

Best Regards,
Community Support Team _ Eason

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi,  @NiekHacquebord 

You need to  create a measure to replace you original column field as below:

 

Measure_Duration = SUM('Table'[Duration])

 

Then change the format of measure as below:

51.png

Best Regards,
Community Support Team _ Eason

Thanks a lot for your solution, I managed to fix it with your help!

Greg_Deckler
Community Champion
Community Champion

@NiekHacquebord You will need to convert those durations to seconds, add them and essentially convert them back more or less. Look at the links below, they should get you what you need.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
https://community.powerbi.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.