cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper IV

## Seconds to HH:MM:SS

Hi guys,

I have numbers with decimals, like:

19,400

8,50

14,70

56,000

The are miliseconds of videos.

I need to transform that to HH:MM: SS. Is it possible? And after, will the column (power m) will work on the sum of that time?

I did see this solution, but It doesnt SUM: https://gist.github.com/jonbgallant/5b8dcf13ab957cecfec3932a42db0e58

Any ideas?

Thanks,

Ed!!

1 ACCEPTED SOLUTION
Super User

Yeah, you have to SUM it when it is in seconds and then take that SUM and convert it to HH:MM:SS format. I know, pain.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
5 REPLIES 5
Anonymous
Not applicable

Hi,

You can do it easily with custom column created and using duration function in M Script.

https://www.powerbitalks.com/2019/12/convert-seconds-to-hhmmss-format.html

Step by step solution has been provided in the article link mentioned above.

Kaushlendra Mishra

www.powerbitalks.com

Helper IV

@Greg_Decklerany idea? 🙂

Super User

Well, if you divide the number of milliseconds by 1000 you would have seconds and then you should be able to use the technique here to get it into HH:MM:SS. https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Helper IV

@Greg_Deckler , thanks for replying, PB ninja.

But the result wont sum up the column result, right?

Super User

Yeah, you have to SUM it when it is in seconds and then take that SUM and convert it to HH:MM:SS format. I know, pain.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors