Skip to main content
cancel
Showing results for 
Search instead 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

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
Europe Fabric Conference

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 Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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