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! Request now

Reply
vaaacadamsp
New Member

How do I display a value in minutes:secconds

I have written the following DAX but I can't figure out what I follow the Return with to provide the minutes and seconds as (nn:ss). I need the results to go into a column chart. 
code:

Current Weekly Avg =
VAR AvgTime = CALCULATE(AVERAGE(MIM[value_seconds]),
FILTER(MIM,MIM[u_week_number] =
WEEKNUM(TODAY(),2)-1))
VAR MinTotal = AvgTime/60
VAR MinInt = TRUNC(MinTotal)
VAR SecTotal = ROUND((MinTotal - MinInt)*60,0)
RETURN
?? nn:ss ?? (not a string)
 
Thank you,
Paul Adams
1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @vaaacadamsp ,

According your provided ,test the below:

Current Weekly Avg = 
VAR AvgTime = CALCULATE(AVERAGE(MIM[value_seconds]),
FILTER(MIM,MIM[u_week_number] =
WEEKNUM(TODAY(),2)-1))
VAR MinTotal = AvgTime/60
VAR MinInt = TRUNC(MinTotal)
VAR SecTotal = ROUND((MinTotal - MinInt)*60,0)
RETURN MinInt& ":" & SecTotal

vluwangmsft_0-1656577863271.png

 

 

Did I answer your question? Mark my post as a solution!And if question still not work ,pls share your sample data.


Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @vaaacadamsp ,

According your provided ,test the below:

Current Weekly Avg = 
VAR AvgTime = CALCULATE(AVERAGE(MIM[value_seconds]),
FILTER(MIM,MIM[u_week_number] =
WEEKNUM(TODAY(),2)-1))
VAR MinTotal = AvgTime/60
VAR MinInt = TRUNC(MinTotal)
VAR SecTotal = ROUND((MinTotal - MinInt)*60,0)
RETURN MinInt& ":" & SecTotal

vluwangmsft_0-1656577863271.png

 

 

Did I answer your question? Mark my post as a solution!And if question still not work ,pls share your sample data.


Best Regards

Lucien

aj1973
Community Champion
Community Champion

HI @vaaacadamsp 

this could help you

aj1973_0-1654287670936.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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