Displaying time duration and format properly in Power BI

Viewed 7105

I have an [Order Date] and an [Import Date] (both with time; MM/DD/YYYY HH:MM:SS AM/PM) displaying when an order was created and when the order actually imported into another system.

I then added a column with a simple formula [Import Date] - [Order Date] = [Delayed Import Time]. This is expressed as a duration 0.00:00:00 (D.HH:MM:SS).

Power BI understands all of this in the Power Query Editor just fine. But when I go to Reports to show a visualization it doesn't display the format of the [Delayed Import Time] in the same duration format 0.00:00:00 (D.HH:MM:SS).

It instead displays it as a decimal number.

How can I get this to display as the duration format in something like a matrix table? That way I can see an avg displayed as "0.00:05:12"; ie delayed import of all records is averaging 5:12 mins.

Order Date and Import Date

Delayed Import Time:shown as a duration

Matrix table displaying avg as decimal

1 Answers

On your added calculated column, change the date type to Time (under the Modeling tab).

From there you can select different format options like hh:mm:ss though I don't think any of them will have the dd. part. If you need that, then you'll likely need to write a measure to format exactly how you want, in which case check out the FORMAT function.

Related