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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Novice_92
Frequent Visitor

Duration hh:mm

Morning everyone,

 

I'm looking to convert whole number into hh:mm without it converting into d:hh:mm when it exceeds 24hrs via DAX.

 

Any ideas?

 

TIA

 

 

4 REPLIES 4
AlexisOlson
Super User
Super User

Can you give a few examples? Is the whole number in units of days, hours, minutes, or something else?

Hi,

 

whole number in this case = seconds and require the formula to convert this into hours & minutes. 

 

Novice_92_0-1655128739745.png

 

Try something like this:

Duration (hh:mm:ss) = 
VAR _Seconds = Table1[Seconds]
VAR _Hours = INT ( _Seconds / 3600 )
VAR _Remainder = ( _Seconds - _Hours * 3600 ) / 3600 / 24
RETURN
    FORMAT ( _Hours, "00:" ) & FORMAT ( _Remainder, "nn:ss" )

You can drop the ":ss" if you just want "hh:mm".

Tahreem24
Super User
Super User

@Novice_92 Try this:

Duration =FORMAT(Table[ColumnName] / 60 / 24, "h:mm")

 

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors