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! Learn more

Reply
soumyaiyer
Helper IV
Helper IV

Show time on y axis line chart

@speedramps

 

Hi, 

 

I am trying to show time (HH:MM:SS) in the line chart on y-axis, but BI shows it as count. I changed the format under the modelling tab but no changes. Need help please. Thanks!Screenshot 2025-07-28 090137.png

1 ACCEPTED SOLUTION
MasonMA
Community Champion
Community Champion

Hello @soumyaiyer 

Power BI does not support Time (hh:mm:ss) as a continuous numeric value on the Y-axis of a line chart. It defaults to some kind of Aggregation (like COUNT) of time-based columns, and often treats Time values as text or datetime, not durations. But you may convert time durations into numeric values for plotting, and then format them back into hh:mm:ss if you want. 

 

Here's a simple demo with some random data to give you some ideas

 

Create a Column to convert your hh:mm:ss to Seconds

MasonMA_0-1753727025378.png

AHT_Seconds = 
HOUR('Table'[Avg Handle Time]) * 3600 +
MINUTE('Table'[Avg Handle Time]) * 60 +
SECOND('Table'[Avg Handle Time])

 

Create one explicit Measure for your Y-Axis values instead of using implicit measures from Power BI like COUNT. (use CALCULATE in Iterator function so correct context transition happens)

Avg_Sec = 
AVERAGEX(
    VALUES('Table'[Day]),
    CALCULATE(AVERAGE('Table'[AHT_Seconds]))
)

 

MasonMA_3-1753727585979.png

 

Idealy you can also create one Tooltip for hh:mm:ss to show on your chart. 

AHT_ToolTip=
VAR TotalSeconds = [Avg_Sec]
VAR HH = INT(TotalSeconds / 3600)
VAR MM = INT(MOD(TotalSeconds, 3600) / 60)
VAR SS = MOD(TotalSeconds, 60)
RETURN FORMAT(HH, "00") & ":" & FORMAT(MM, "00") & ":" & FORMAT(SS, "00")

 

Hope this helps:)

 

 

View solution in original post

2 REPLIES 2
soumyaiyer
Helper IV
Helper IV

Thank you! I have another question. I will create new request and mention you !

MasonMA
Community Champion
Community Champion

Hello @soumyaiyer 

Power BI does not support Time (hh:mm:ss) as a continuous numeric value on the Y-axis of a line chart. It defaults to some kind of Aggregation (like COUNT) of time-based columns, and often treats Time values as text or datetime, not durations. But you may convert time durations into numeric values for plotting, and then format them back into hh:mm:ss if you want. 

 

Here's a simple demo with some random data to give you some ideas

 

Create a Column to convert your hh:mm:ss to Seconds

MasonMA_0-1753727025378.png

AHT_Seconds = 
HOUR('Table'[Avg Handle Time]) * 3600 +
MINUTE('Table'[Avg Handle Time]) * 60 +
SECOND('Table'[Avg Handle Time])

 

Create one explicit Measure for your Y-Axis values instead of using implicit measures from Power BI like COUNT. (use CALCULATE in Iterator function so correct context transition happens)

Avg_Sec = 
AVERAGEX(
    VALUES('Table'[Day]),
    CALCULATE(AVERAGE('Table'[AHT_Seconds]))
)

 

MasonMA_3-1753727585979.png

 

Idealy you can also create one Tooltip for hh:mm:ss to show on your chart. 

AHT_ToolTip=
VAR TotalSeconds = [Avg_Sec]
VAR HH = INT(TotalSeconds / 3600)
VAR MM = INT(MOD(TotalSeconds, 3600) / 60)
VAR SS = MOD(TotalSeconds, 60)
RETURN FORMAT(HH, "00") & ":" & FORMAT(MM, "00") & ":" & FORMAT(SS, "00")

 

Hope this helps:)

 

 

Helpful resources

Announcements
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!

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.