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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Custom text labels for numeric field in line chart

Is it possible to assign a text column as the label for a numeric column in a line chart?  This is only necessary because powerbi cannot build visuals from useful datetime or duration values.

 

In the example below, the line chart is built with dtRunMonth (datetime) on the x-axis and decAvgDurationSeconds (integer) as the values.  Both values already exist in my table.

 

I would like the label '1108' to be replaced by '0:00:18:28' (text field).  How can I accomplish this?

jrbrown00_0-1644004939545.png

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Use Chelsie Eiden's duration to display durations as hh:mm:ss for example but leave underlying number numeric. Also, you can use a similar technique to use dates and datetimes in Y-Axis for example:

(1) Chelsie Eiden's Duration - Microsoft Power BI Community

Dates and DateTime in Y - Microsoft Power BI 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...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Anonymous Use Chelsie Eiden's duration to display durations as hh:mm:ss for example but leave underlying number numeric. Also, you can use a similar technique to use dates and datetimes in Y-Axis for example:

(1) Chelsie Eiden's Duration - Microsoft Power BI Community

Dates and DateTime in Y - Microsoft Power BI 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...
Anonymous
Not applicable

Sign me up as a Chelsie Eiden fan!

I put it into a single line in the data view to work directly from a SQLServer DateTime field:

DurationNeedsCustomFormat = Hour(MyTable[DateTimeField]) *10000+Minute(MyTable[DateTimeField])*100 +Second(MyTable[DateTimeField])

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.