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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Change minutes to hours

Hi, 

I got a colum with a Whole number in minutes, I need your help in calculating a colum with the same value in hours, for example if a value is 60 the result would be 1:00 

 I used this calulation but didnt worked!

Time in Hours = var Duracion =CAP_TIEMPOATEN[TIEMPO_ATENCION_BLOQ2]
var Horas = INT(Duracion/3600)
var Minutos = INT(MOD(Duracion-(Horas*3600);3600)/60)
var segundos = ROUNDUP(MOD(MOD(duracion-(Horas*3600);3600);60);0)

 

Horas.PNG

 

Please I need help

 

5 REPLIES 5
LivioLanzo
Solution Sage
Solution Sage

@Anonymous

 

you can use this simple formula and then give the column a Time data type and format it to H:mm

 

Capture.PNG

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Anonymous
Not applicable

Thanks, @LivioLanzo it worked, is there any way to sum or get the average of  this times, for example I got 4 measures every

month and I want the average time in hours

av.PNG

 

 

@Anonymous

 

do you mean average by month? you could drop the month in a matrix and calculate the average ?

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Anonymous
Not applicable

@LivioLanzo

 

Yes an average by month, and I did drop in a matrix, but I couldnt sum or get an average of my data

Weird. Could you upload your sample? @Anonymous

 

thanks 

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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