Forum Discussion
Anonymous
8 years agoNot applicable
Time/Duration Value Display
I am looking for a way to display total duration that is over 24 hours. Currently if the sum of two durations is 34:22 hours it will display as: 10:22 This must be because the Power BI...
- 8 years ago
I would try this, the format is text
Measure = VAR Hours = INT([Total Duration]*24) VAR Minutes = RIGHT(FORMAT([Total Duration],"hh:mm"),2) RETURN Hours & ":" & Minutes
- 8 years ago
try this
Measure = VAR Hours = INT([Total Duration]*24) VAR Minutes = RIGHT(FORMAT([Total Duration],"hh:mm"),2) VAR Separator = IF([Total Duration]=BLANK(),BLANK(),":") RETURN Hours & Separator & Minutes
Anonymous
8 years agoNot applicable
Thank you so much for the guide. When I applied this measure it displayed "12/31/1899" for all of my measures. I tried changing the data type to time, text, general, whole number and none of them seemed to solve the issue. Any ideas?
Stachu
8 years agoCommunity Champion
I would try this, the format is text
Measure = VAR Hours = INT([Total Duration]*24) VAR Minutes = RIGHT(FORMAT([Total Duration],"hh:mm"),2) RETURN Hours & ":" & Minutes
- Anonymous8 years agoNot applicable
Worked like a charm! Thanks so much!
- Anonymous8 years agoNot applicable
Stachu The issue I have now is that I get a ":" for values that should be blank. I tried an if statment but cant get it to work properly. any suggestions?
- Stachu8 years agoCommunity Champion
try this
Measure = VAR Hours = INT([Total Duration]*24) VAR Minutes = RIGHT(FORMAT([Total Duration],"hh:mm"),2) VAR Separator = IF([Total Duration]=BLANK(),BLANK(),":") RETURN Hours & Separator & Minutes
- Anonymous8 years agoNot applicable
**bleep**, Your good! Thank you so much. I have been trying to figure this out for a month! WOrked like a charm!