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
kumsha1
Post Patron
Post Patron

Duration Mins in HH:MM format

Hi,

 

I have Duration (mins) changed to HH:MM format using below calc. measure (format-Text). But the same is displaying unwanted dimension values in a table and " : " is not being filtered. Can someone please help with this?, TIA, cheers !

 

Operating Duration (HH:MM) - ALL =
var vminutes = [Operating Duration (mins) - ALL]
var vhours = int(vminutes/60)
var vremainingminutes = MOD(vminutes,60)
return
FORMAT(vhours,"0#") &" : "&FORMAT(vremainingminutes,"0#")
 
---
Capture.JPG 
 

 

1 ACCEPTED SOLUTION
tex628
Community Champion
Community Champion

Try this,

Operating Duration (HH:MM) - ALL = 
var vminutes = [Operating Duration (mins) - ALL]
var vhours = int(vminutes/60)
var vremainingminutes = MOD(vminutes,60)
return
IF(ISBLANK([Operating Duration (mins) - ALL]) , BLANK() , 
FORMAT(vhours,"0#") &" : "&FORMAT(vremainingminutes,"0#")
)


Br
J


Connect on LinkedIn

View solution in original post

2 REPLIES 2
tex628
Community Champion
Community Champion

Try this,

Operating Duration (HH:MM) - ALL = 
var vminutes = [Operating Duration (mins) - ALL]
var vhours = int(vminutes/60)
var vremainingminutes = MOD(vminutes,60)
return
IF(ISBLANK([Operating Duration (mins) - ALL]) , BLANK() , 
FORMAT(vhours,"0#") &" : "&FORMAT(vremainingminutes,"0#")
)


Br
J


Connect on LinkedIn

@tex628 , many thanks for your help !

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.