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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
user35131
Helper III
Helper III

Would like to dynamic format seconds numeric measure to "mm:ss" for line graph y-axis.

 

TEST = 
VAR TotalSeconds =
    AVERAGEX(
        FILTER(
            Table,
            Table[Segment] = "1" && Table[Value]="Y"
        ),
        Query1[Seconds]
    )
return TotalSeconds<p>

The result I got was 438.92 seconds which is correct when I set to my current filters. Is there a way to format this as a "07:19" in my line graph without changing the value to text?

 

When i clicked Dynamic for Format in Measure Tools I added this format 

 

VAR TotalSeconds =
    AVERAGEX(
        FILTER(
            Query1,
            Query1[Segment] = "1" && Query1[value]="Y"
        ),
        Query1[Seconds]
    )
VAR Minutes = INT(TotalSeconds / 60)
VAR Seconds = MOD(TotalSeconds, 60)  // Round down seconds
RETURN
    FORMAT(Minutes, "00") & ":" & FORMAT(Seconds, "00")

 

When I do this i get a strange value 4397.19

 

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@user35131 I did this once although there was a bug in Desktop that prevented it from working correctly. Maybe they still haven't fixed it? Dates and DateTime in Y - Microsoft Fabric Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.