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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Digger
Post Patron
Post Patron

hh:mm:ss chart in pbi

How to create same excel chart in pbi?

 

Digger_0-1668698532495.png

 

1 ACCEPTED SOLUTION

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

Digger_0-1668753179261.png

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

Digger_0-1668757963331.png

 

View solution in original post

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @Digger 

 

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

cbrt.png

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


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

Digger_0-1668753179261.png

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

Digger_0-1668757963331.png

 

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.

@Digger 

 

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

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors