Forum Discussion
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?
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:
2 Replies
- Greg_Deckler
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:
- AnonymousNot 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])