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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
matheuskei
New Member

how to conver or format minutes with dax or something else ?

matheuskei_0-1676056032205.png

 

i need put the minutes (tempo suprimido) like 00:02 or 0:02 (not like in the firt row 0:2) 

 

thanks ❤️ 

2 ACCEPTED SOLUTIONS
ppm1
Solution Sage
Solution Sage

tamerj1
Super User
Super User

Hi @matheuskei 

please try

Tempo Suprimido2 =
VAR String = 'Table'[Tempo Suprimido]
VAR Items =
SUBSTITUTE ( String, ",", "|" )
VAR Hours1 =
PATHITEM ( Items, 1 )
VAR Hours2 =
IF ( LEN ( Hours1 ) = 1, "0" & Hours1, Hours1 )
VAR Minutes1 =
PATHITEM ( Items, 2 )
VAR Minutes2 =
IF ( LEN ( Minutes1 ) = 1, "0" & Minutes1, Minutes1 )
RETURN
TIMEVALUE ( Hours2 & ":" & Minutes2 )

View solution in original post

5 REPLIES 5
matheuskei
New Member

Hey guys i just wanna say thanks for u support and everything ❤️ u are amazing. 

tamerj1
Super User
Super User

Hi @matheuskei 

please try

Tempo Suprimido2 =
VAR String = 'Table'[Tempo Suprimido]
VAR Items =
SUBSTITUTE ( String, ",", "|" )
VAR Hours1 =
PATHITEM ( Items, 1 )
VAR Hours2 =
IF ( LEN ( Hours1 ) = 1, "0" & Hours1, Hours1 )
VAR Minutes1 =
PATHITEM ( Items, 2 )
VAR Minutes2 =
IF ( LEN ( Minutes1 ) = 1, "0" & Minutes1, Minutes1 )
RETURN
TIMEVALUE ( Hours2 & ":" & Minutes2 )

ppm1
Solution Sage
Solution Sage

Please see this article.

Calculate and Format Durations in DAX – Hoosier BI

 

Pat

 

Microsoft Employee
nchr
Frequent Visitor

What is the data type of the measure that gives you the time? Is it DATETIME, is it seconds, minutes, fraction of the day?

 

If the tempoSuprimido measure is text, then maybe you can use this:

 

FORMAT( TIMEVALUE([TempoSuprimido]), "nn:ss")

tamerj1
Super User
Super User

Hi @matheuskei 

try by using TIMEVALUE function 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.