0
votes

Is it possible to change format cells in result table? I am doing some summarize using PowerBI using number format. But after summarize I want to change to duration. I can change data source type but Power Bi dont support format "dd:hh:mm:ss" only "hh:mm:ss" so if some action cost 45 hours power bi show only 21:00:00 instead of 01:21:00:00(this is format that I want to achive, but if I change it in data source I cannot summarize it because it is text).

1

1 Answers

2
votes

You can try this :

FormatTime =

VAR h = INT('Table'[yourColumn]/3600)
VAR m = FORMAT(INT(DIVIDE(MOD('Table'[yourColumn],3600),60)), "00")
VAR s = FORMAT(INT(MOD(MOD([yourColumn],3600),60)),"00")

RETURN
h& ":" & m  & ":" & s

Also don't forget to change FormatTime column to the type Time.