cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Post Patron

## hh:mm:ss chart in pbi

How to create same excel chart in pbi?

1 ACCEPTED SOLUTION
Post Patron

@PhilipTreacy , you wrong, PBI does, i found solution

All you need is use this measure

_Measure HH:mm:SS =
VAR vHoursDecimal = 1111,12 // HOURS!!! not seconds
VAR vHours = INT ( vHoursDecimal )
VAR vMinutesDecimal = 60 * ( vHoursDecimal - vHours )
VAR vMinutes = INT ( vMinutesDecimal )
VAR vSeconds = ROUND ( 60 * ( vMinutesDecimal - vMinutes ), 0 )
VAR vHH = IF ( LEN ( vHours ) = 1, "0" & vHours, vHours )
VAR vMM = IF ( LEN ( vMinutes ) = 1, "0" & vMinutes, vMinutes )
VAR vSS = IF ( LEN ( vSeconds ) = 1, "0" & vSeconds, vSeconds )
RETURN
CONVERT ( vHH & vMM & vSS, INTEGER )

and then change measure fomating, just typing 00:00:00

4 REPLIES 4
Super User

Hi @Digger

PBI won't plot time on the Y axis like that.  The best you'll get is this

regards

Phil

If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!

Post Patron

@PhilipTreacy , you wrong, PBI does, i found solution

All you need is use this measure

_Measure HH:mm:SS =
VAR vHoursDecimal = 1111,12 // HOURS!!! not seconds
VAR vHours = INT ( vHoursDecimal )
VAR vMinutesDecimal = 60 * ( vHoursDecimal - vHours )
VAR vMinutes = INT ( vMinutesDecimal )
VAR vSeconds = ROUND ( 60 * ( vMinutesDecimal - vMinutes ), 0 )
VAR vHH = IF ( LEN ( vHours ) = 1, "0" & vHours, vHours )
VAR vMM = IF ( LEN ( vMinutes ) = 1, "0" & vMinutes, vMinutes )
VAR vSS = IF ( LEN ( vSeconds ) = 1, "0" & vSeconds, vSeconds )
RETURN
CONVERT ( vHH & vMM & vSS, INTEGER )

and then change measure fomating, just typing 00:00:00

New Member

I don't think this quite works. It interprets your values as integers and that doesn't log well on the Y axis. The convert function at the end just concatenates the 3 parts into a single integer. So 59 minutes becomes 5900, 1 hour becomes 10000, and they plot as integers at those values. Your graph is then skewed.

Super User

Care to share your solution so we can see how you did it?

Regards

Phil

If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors