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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Daniele__R
New Member

Why can't I plot measures formatted as mm:ss in visuals, but they work in tables?

Hi everyone,

I'm working with time-based measures in Power BI and trying to display durations in a minutes:seconds (mm:ss) format. I’ve run into a limitation that I’d like to understand better.

Here’s a simplified version of the measure I’m using:

---------------------------------------------------------

DurationMeasure =

VAR ValueA =

    CALCULATE(

        SUM('DataTable'[Value]),

        'DataTable'[Metric] = "MetricA",

        'DimensionTable'[Category] IN SelectedCategories

    )

VAR ValueB =

    CALCULATE(

        SUM('DataTable'[Value]),

        'DataTable'[Metric] = "MetricB",

        'DimensionTable'[Category] IN SelectedCategories

    )

VAR DurationInSeconds = DIVIDE(ValueA, ValueB)

RETURN

    DurationInSeconds

---------------------------------------------------------

If I wrap the result using TIME(0, 0 DurationInSeconds), it displays perfectly in table visuals as mm:ss.

However, when I try to use this same measure in a chart visual (like bar or line), the value disappears or the axis breaks. It seems like TIME() returns a datetime value that isn’t compatible with chart axes.

 

I’d really appreciate any insights, explanations, or workarounds from the community. If there’s a recommended way to plot durations in mm:ss format directly on chart axes, I’d love to learn more.

Thanks in advance for your help!

1 ACCEPTED SOLUTION
xifeng_L
Super User
Super User

Hi @Daniele__R 

 

You can use the dynamic format of Measure to implement it, as shown in the following figure:

 

xifeng_L_0-1760430945478.png

 

The format expression as bellow:

 

VAR CurMeasureVal = SELECTEDMEASURE()
RETURN
""""&FORMAT(TIME(0,0,CurMeasureVal),"nn:ss")&""""

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

View solution in original post

3 REPLIES 3
xifeng_L
Super User
Super User

Hi @Daniele__R 

 

You can use the dynamic format of Measure to implement it, as shown in the following figure:

 

xifeng_L_0-1760430945478.png

 

The format expression as bellow:

 

VAR CurMeasureVal = SELECTEDMEASURE()
RETURN
""""&FORMAT(TIME(0,0,CurMeasureVal),"nn:ss")&""""

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

Thanks for the solution : it worked really well and helped me get the formatting I needed! 

 

I still have a small problem though: on the Y-axis of my visual, I keep getting the same value repeated across each level, which makes it hard to read or interpret properly. If you (or anyone else) has ideas on how to improve the Y-axis display in this kind of setup, I’d really appreciate it.

Thanks in advance for any suggestions! 

Daniele__R_0-1760445600733.png

 

rohit1991
Super User
Super User

Hi @Daniele__R 

 

1. When you wrap your measure with-

TIME(0, 0, [DurationInSeconds])

It returns a datetime value (a time portion of a date). Table visuals can display this easily using the format string mm:ss but chart visuals (bar, line, etc.) treat the Y-axis as numeric and a datetime type isn’t numeric, so the axis can’t render it. That’s why it appears blank or the axis breaks.
Note:Keep your measure numeric (in seconds) and only format it for display.

 

2. Create a base numeric measure (your current logic):

DurationSeconds =
DIVIDE([ValueA], [ValueB])

 

3. Then create a formatted measure just for tables or cards:

Duration mm:ss =
VAR MinPart = INT([DurationSeconds] / 60)
VAR SecPart = MOD([DurationSeconds], 60)
RETURN
FORMAT(MinPart, "00") & ":" & FORMAT(SecPart, "00")
  • Use DurationSeconds in charts (for proper numeric scaling).
  • Use Duration mm:ss in tables or cards (for readable format).


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

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.