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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
young351
Frequent Visitor

Calculate/Sum duration by day

I need to create a line graph that will tell me the duration (downtime) per day based off of the information below.  Using the example below, I know my total duration (downtime) was 21 hrs and 56 min, but I need a calculation to tell me the duration on the 26th and the 27th in order to graph this out. 

young351_0-1635884518108.png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @young351 

 

You can try the following methods.

 

Duration =
TIME ( 0, DATEDIFF ( [Start Time], [End Time], MINUTE ), 0 )

 

vzhangti_0-1636339359710.png

 

Best Regards,

Charlotte Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @young351 

 

You can try the following methods.

 

Duration =
TIME ( 0, DATEDIFF ( [Start Time], [End Time], MINUTE ), 0 )

 

vzhangti_0-1636339359710.png

 

Best Regards,

Charlotte Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

vojtechsima
Super User
Super User

Hi, @young351 
You can use DATEDIFF function to retrieve the time from midnight to the start of the start day, and from midnight to end for the next day if the downtime exceeds one day.
However, if you could provide sample data that can be copied, I could create a tailor-made solution for you.






Any kudos or recognition appreciated. To learn more on the topic, check out my blog and follow me on LinkedIn.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.