Forum Discussion
Converting secs to hr
- 5 years ago
Hi, Anonymous
I think you missed adding the second of 'hh:mm:ss' in your measure. You may create a calculated colum and modify measures as below. The pbix file is attached in the end.
Calculated column:
Second = SECOND([Time])Measure:
Total Hours = DIVIDE( SUM('Table'[Hour])*3600+SUM('Table'[Minute])*60+SUM('Table'[Second]), 3600, 0 )Result = DIVIDE( SUM('Table'[Count of visitor emaiil]), [Total Hours], 0 )Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create two measures as below.
Total Hours =
SUM('Table'[Hour])+
DIVIDE(
SUM('Table'[Minute]),
60,
0
)Result =
DIVIDE(
SUM('Table'[Count of visitor emaiil]),
[Total Hours],
0
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-alq-msft and amitchandak
Thank you very much for the responses. Sorry, I may have not explained it well but I need to convert hh:mm:ss into decimal. I did put too much information at first.
I currently have this formula on PowerBI and it is turning it into decimal but not correctly.
I have a column that is in hh:mm:ss and I need that be in decimal.
Really appreciate your time and help. Thank you!