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
DAXRichArd
Resolver I
Resolver I

Convert whole number representing minutes to duration hh:mm (hours:minutes)

Hello,

I work with Commercial Aviation Data.

  • I want to convert a whole number that represents minutes into duration.
  • The whole number that represents minutes is a measure that calculates the total flight time from an aircraft's point of origin to it's destination.


My table name is HAS Web Schedule Data.
My measure name is Flight Time.

 

My desired output is a matrix that shows

 

Airline Destination  Country Destination   City         Departure Time  Seats  Flight Time
China Airlines          China                          Beijing   11:00 am             311    hh:mm

 

I've looked through this forum but haven't found anything that directly addresses my question. I've tried reverse engineering similar questions / solutions but I haven't been able to. Thx in advance for your help and support.

 

Thx in advance for all your help.

DAXRichArd

 

Below is a screenshot of what my data looks like before I query it and clean it up.

FlightTime.JPG

2 ACCEPTED SOLUTIONS
jdbuchanan71
Super User
Super User

Hello @DAXRichArd 

Give this one a try, should with with a column or a measure.

Duration Fomatted = FORMAT(Table1[Duration Minutes] / 60 / 24, "h:mm")

minutes_to_duration.png

 

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Hello @DAXRichArd 

Give this one a try, should with with a column or a measure.

Duration Fomatted = FORMAT(Table1[Duration Minutes] / 60 / 24, "h:mm")

minutes_to_duration.png

 

It works! Thx. 

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.