Forum Discussion
Anonymous
7 years agoNot applicable
Assistance required: Converting seconds measures
Hello All, I needed some assistance. I have gone through the forums but cant seem to find an answer. I have a measure called run time, which gives me numerical values like 78555,9875,etc. ...
- 7 years ago
See if this article helps. https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486. But you probably want something along the lines of (as a column):
Column = VAR __secondsInDay = 86400 VAR __secondsInHour = 3600 VAR __days = INT([Value]/__secondsInDay) VAR __hours = INT(([Value]-(__days*__secondsInDay))/__secondsInHour) RETURN __days & " Days " & __hours & " Hours"
- 7 years ago
Hi Anonymous,
Rather than create a calculated column, you could new a measure instead still with above formula.
Measure = VAR __secondsInDay = 86400 VAR __secondsInHour = 3600 VAR __days = INT('arms_reach vw_mold_tracking'[Enabled]/__secondsInDay) VAR __hours = INT(([Enabled]-(__days*__secondsInDay))/__secondsInHour) RETURN __days & " Days " & __hours & " Hours"Best regards,
Yuliana Gu
Greg_Deckler
Community Champion
7 years agoSee if this article helps. https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486. But you probably want something along the lines of (as a column):
Column = VAR __secondsInDay = 86400 VAR __secondsInHour = 3600 VAR __days = INT([Value]/__secondsInDay) VAR __hours = INT(([Value]-(__days*__secondsInDay))/__secondsInHour) RETURN __days & " Days " & __hours & " Hours"
Anonymous
7 years agoNot applicable
Hi Greg_Deckler , how would you do this in dax if you were to include minutes and seconds as well? So, day, hour, minute, second.
Best,
Nils