3
votes

I am working with PowerBI and would like to show time duration in the format "hh:mm:ss".

I know how to convert duration (seconds, minutes, hours etc.) into a string in the format "hh:mm:ss" using DAX, but is it possible to get this format as labels in a bar chart for example?

Searching on the internet it seems this is not possible, but I was not able to find a definite answer.

Below is a picture where the added red text shows the desired result (right now the red text is static and manually added).

Example of desired output

In short: Is it possible to show time duration in the format "hh:mm:ss" in charts in PowerBI?

1

1 Answers

4
votes

Unfortunately, that does not seem to be possible at the moment. The problem is that measures that do not return integer or decimal values can not be used as values in bar/line charts.

The best you can currently do, is to add the measure as a tooltip.

So given a measure [Duration in Seconds], which returns an integer or decimal value, create a new measure:

Duration as Time = TIME(0, 0, [Duration in Seconds])

Format this measure as Date Time > HH:mm:ss.

Then, create your bar chart using [Duration in Seconds] as values, and add [Duration as Time] as tooltips:

enter image description here

If you need to have data labels formatted as HH:mm:ss, consider upvoting this Power BI idea.