Forum Discussion
Convert seconds into hours and their format
- 9 years ago
Hi Anonymous,
To convert the second to hours, you only need to divide it by 3600.
TotalOrganizational Failures = CALCULATE (SUM (IndicatorValue [Value]); Indicator [Name] = "Organizational Failures")/3600
Best regards,
Yuliana Gu
Hi Anonymous,
We are able to convert seconds into hours with format "hh:mm:ss".
hh:mm:ss =
RIGHT ( "0" & INT ( Table[seconds] / 3600 ), 2 )
& ":"
& RIGHT (
"0"
& INT ( ( Table[seconds] - INT (Table[seconds] / 3600 ) * 3600 ) / 60 ),
2
)
& ":"
& RIGHT ( "0" & MOD (Table[seconds], 3600 ), 2 )
But after formatting, values will be set to text data type. It is not possible to show actual values of text data in a bar chart, because it will be aggregated (Count/Count Distinct) automatically if adding it into values section in a chart visual.
So, your requirement cannot be achieved currently.
Best regards,
Yuliana Gu
In this case I will then display the value in hours not displaying the format "hh: mm: ss", using the measure that I am already using what change should I make for it?
TotalOrganizational Failures = CALCULATE (SUM (IndicatorValue [Value]); Indicator [Name] = "Organizational Failures")
- v-yulgu-msft9 years agoMicrosoft Employee
Hi Anonymous,
To convert the second to hours, you only need to divide it by 3600.
TotalOrganizational Failures = CALCULATE (SUM (IndicatorValue [Value]); Indicator [Name] = "Organizational Failures")/3600
Best regards,
Yuliana Gu