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
JWE
Helper I
Helper I

Convert minutes into days and timeformat

Hi folks

 

I want to convert minutes into readable stuff for the endusers, e.g.:


I have 2.480,08 minutes

I want to format this in duration (but not in Time-Format) because the value is greater than 24 hours.

Result shoud be:

1 day 08:22:16

 

But without VAR - this slowdown extremly all my visualizations - isn´t it?

 

How to proceed?

 

Thanks in advance Jorg

1 ACCEPTED SOLUTION

Hi - thanks, it works. Hopefully the VAR function works quick enough also with big data!

 

I have modified your DAX, to display the days or not, and hour work day has only 15 hours, so I divide through 900 instead of 1440.

 

WE Dauer gesamt =
var Tag=  INT(Lagerbeleg[WE Dauer in Min] / 900)
var Stunde=  INT(MOD(Lagerbeleg[WE Dauer in Min]; 900) / 60)
var Minute=  MOD(MOD(Lagerbeleg[WE Dauer in Min]; 900); 60)
var Sekunde= INT((Lagerbeleg[WE Dauer in Min] - INT(Lagerbeleg[WE Dauer in Min])) * 60)
return
IF(Tag = 0; "";
  IF (Tag > 1; Tag & " Tage "; Tag & " Tag "))
& FORMAT(Stunde; "#00")
& ":"
& FORMAT(MINUTE; "#00")
&":"&
FORMAT(Sekunde; "#00")

View solution in original post

13 REPLIES 13

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.