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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Spotto
Helper IV
Helper IV

Convert an hour to a measure as a value

hello everyone, I need a measure that brings me the time extracted from a date/time field, but when I did that the result is bringing the value as text and I needed the result as a number to compare it later if it is greater or less than a value.
thank you for the help

 

Spotto_0-1648051275879.png

Time =
var horas = format(MAX('gdp tb_Pagamento_Contrato'[Data_Liberado_PGTO]),"hh")
return horas
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Instead of FORMAT, you can write

 

Time = TIMEVALUE ( MAX ( Table1[DateTime] ) )

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

Instead of FORMAT, you can write

 

Time = TIMEVALUE ( MAX ( Table1[DateTime] ) )

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Kudoed Authors