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
Anonymous
Not applicable

Duration/ ROUND?

Hello,

 

I finally managed to sum my durations but in the Visual it shows not the correct duration like 14:00. It shows me 13:60. When I add a minute it will show 13:61. How can I fix this? 

Duration =
// We start with a duration in number of seconds
VAR Duration = SUM(Table[Column)])
// There are 86,400 seconds in an day
VAR Days = INT ( Duration / 86400)
// There are 3600 seconds in a hour
VAR Hours = INT ( MOD( Duration - ( Days * 86400 ),86400 ) / 3600)
// Remaining seconds are the remainder of the seconds divided by 60 after subtracting out the hours
VAR Minutes = INT (MOD ( MOD( Duration - ( Days * 86400 ),86400 ), 3600 ) / 60)
RETURN
// We put the hours, minutes and seconds into the proper "place"
Hours * 100 + Minutes
6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous ,

 

Sample data without sensitive information and expected output would help tremendously.
Please see this post regarding: How-to-provide-sample-data-in-the-Power-BI-Forum 

 

Hope it helps,


Community Support Team _ Caitlyn

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

Greg_Deckler
Community Champion
Community Champion

@Anonymous Looks like you are using Chelsie Eiden's Duration - Microsoft Power BI Community. Would need to see sample data to test.

 

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



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...
Anonymous
Not applicable

@Greg_Deckler  Yes it is Chelsie Eidens Measure 😄 The durations are in seconds. It should show me 14:00, not 13:60. Thanks.

 

 

 

 

@Anonymous Can you paste the sample data as text? I really don't want to do a bunch of typing.



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...
Tahreem24
Super User
Super User

@Anonymous  Try to use ROUND function to rounding it.

MEASURE = ROUND(Table[DurationColumn],0)

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Didnt work

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.