Forum Discussion
efilipe
Helper IV
8 years agoDecimal to HH:MM:SS
Hi guys,
I have numbers with decimals, like:
19,400
8,50
14,70
56,000
The are miliseconds of videos.
I need to transform that to HH:MM:SS. Is it possible? And after, will the column (power m) will work on the sum of that time?
Any ideas?
Thanks,
Ed!!
Hi efilipe,
Please create a measure below:
HH:MM: SS = RIGHT ( "0" & INT ( SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) / 3600000 ), 2 ) & ":" & RIGHT ( "0" & INT ( ( SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) - INT (SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) / 3600000 ) * 3600000 ) / 60000 ), 2 ) & ":" & RIGHT ( "0" & INT(DIVIDE(MOD (SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]), 60000 ), 1000)), 2 )Best Regards,
Qiuyun Yu
2 Replies
- v-qiuyu-msft
Community Support
Hi efilipe,
Please create a measure below:
HH:MM: SS = RIGHT ( "0" & INT ( SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) / 3600000 ), 2 ) & ":" & RIGHT ( "0" & INT ( ( SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) - INT (SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) / 3600000 ) * 3600000 ) / 60000 ), 2 ) & ":" & RIGHT ( "0" & INT(DIVIDE(MOD (SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]), 60000 ), 1000)), 2 )Best Regards,
Qiuyun Yu - efilipe
Helper IV
I did see this, looks awsome, but I can't SUM...
https://gist.github.com/jonbgallant/5b8dcf13ab957cecfec3932a42db0e58