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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MarcusR1
Helper I
Helper I

Time calculation and formating in Power BI

Hi, I have some time related data including start, stop and duration (in seconds) and I want to display a summary card with the hours:minutes:seconds but I can't seem to get the formula to work:

 

Data:

date start end duration
01/01/2024 00:00 01/01/2024 08:54 01/01/2024 09:25 1835
01/01/2024 00:00 01/01/2024 10:01 01/01/2024 10:26 1468
01/01/2024 00:00 01/01/2024 11:04 01/01/2024 11:46 2517
01/01/2024 00:00 01/01/2024 12:21 01/01/2024 13:20 3581
01/01/2024 00:00 01/01/2024 13:42 01/01/2024 14:43 3627

 

Formula:

hoursFormatted = Format(data[duration],"hh:nn:ss","en-GB")

 

Result:

MarcusR1_0-1718281747384.png

 

can anyone help?

thanks

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@MarcusR1 Should just be:

 

Duration = [end] - [start]

DurationFormatted = FORMAT([duration], "hh:mm:ss")

 



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...

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @MarcusR1 ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Sergii24
Super User
Super User

Screenshot of what Greg Deckler has just suggested you 🙂

Sergii24_0-1718283139067.png

 

Greg_Deckler
Community Champion
Community Champion

@MarcusR1 Should just be:

 

Duration = [end] - [start]

DurationFormatted = FORMAT([duration], "hh:mm:ss")

 



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...

Thank you Greg, that's great. How do I sum those to get:

MarcusR1_0-1718284270158.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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