Forum Discussion
ranis1227
3 years agoHelper I
Time value for an Average Column
Hello, I created a summarized table and am trying to convert an average time value (Average Hour Time in this case) to a time format (HH:MM:SS). See Screenshot: So 12.11 for Medici...
- 3 years ago
Hi ranis1227 ,
You can try this method:
New a measure:
Average_Time = var _hours = ROUNDDOWN(SUM('Table'[Average Hour Time]), 0) var _minutes = (SUM('Table'[Average Hour Time]) - _hours) * 60 var _seconds = (_minutes - ROUNDDOWN(_minutes, 0)) * 60 return TIME(_hours, _minutes, _seconds)Need to change the type here:
The result is:
Hope this helps you. Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yinliw-msft
3 years agoCommunity Support
Hi ranis1227 ,
You can try this method:
New a measure:
Average_Time =
var _hours = ROUNDDOWN(SUM('Table'[Average Hour Time]), 0)
var _minutes = (SUM('Table'[Average Hour Time]) - _hours) * 60
var _seconds = (_minutes - ROUNDDOWN(_minutes, 0)) * 60
return
TIME(_hours, _minutes, _seconds)
Need to change the type here:
The result is:
Hope this helps you. Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ranis1227
3 years agoHelper I
Thank you v-yinliw-msft . This is exactly what I needed.