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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Hotkey
Frequent Visitor

Converting a decimal minuts information to duration type

Hi there,

 

i currently receive a duration information as a decimal value. e.g 4.65 which are 4.65 * 60 = 279 seconds = 4:39 (M:SS).

I want to convert this value to a new column which i can set to the type "duration". Of course i can do the calculation but i wonder what is the "right" way to do perform this operation?

 

Thanks in advance

 

Henrik

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

in PowerBI, when it comes to date/times:
1 = 1 day, which is 1440 min.
so if you do 4.65/1440 then you will get a decimal in reference to 1 which you should be able to convert to duration type



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

Well, duration is still a pain in Desktop. Query Editor has a duration type but desktop does not. I would probably leave it in seconds in Query Editor and work with it that way.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Stachu
Community Champion
Community Champion

in PowerBI, when it comes to date/times:
1 = 1 day, which is 1440 min.
so if you do 4.65/1440 then you will get a decimal in reference to 1 which you should be able to convert to duration type



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Hotkey
Frequent Visitor

Thanks, this worked for me

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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