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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
CH-BsAs
Frequent Visitor

HOUR/MINUTE values

Hello everyone, I have a question for you

I have to calculate the response time of a service. I achieve that by obtaining the difference of two fields of a table. (end of service time - service start time)

 

Response = Hours[endtime] – Hours[starttime]

The data is expressed in format (yy-MM-dd HH:mm:ss)  So the expresión returns the data also in the same format.

But I need this value expressed in hours. So I came up with this solution

T_hs = HOUR(Hours[Response])

T_min= MINUTE(Hours[Response])

T_sec= SECOND(Hours[Response])

T_Response = Hours[T_hs]+ Hours[T_min]/60+ Hours[T_sec]/3600

 

The problem is that I end up with a decimal number that, although it is correct, expresses the hours in a format that does not work for me.

For example the result is 2.5 but I need to see it as 2:30 (hours: minutes).

 

I think the way I resolved this is not compatible with the way I need the information to be shown, maybe I should start over and find a better solution.

 

 

Any suggestions?

 

 

I have a similar problem with another field that has a value in seconds

I need this in minutes ...

 

TRATmin = Services[trat]/60

again the result is for example 4:75 when I really need to see it as 4:45

I use two card visualizations, in one for SUM and the other for AVERAGE. I have tu came up with a solution that Works for this tipe of visualization.

 

sorry for my English. It is not my native tongue.

Bye!

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

This is not an uncommon problem. There are lots of issues with duration essentially. See these articles:

 

 

https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
wonderDorwnUnde
New Member

How about Format([number of hours]/24,"hh:mm") - haven't tested for numbers  larger than 24 - But for smaller numbers this should work based  on my limited understanding of Microsoft Date numbers it should work

Greg_Deckler
Community Champion
Community Champion

This is not an uncommon problem. There are lots of issues with duration essentially. See these articles:

 

 

https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.