Forum Discussion
Anonymous
5 years agoNot applicable
Create a function in DAX?
I have a table with about 20 measures displaying a number which is the number of seconds. E.g. 19,000 which means 5 hours 16 minutes and 40 seconds. I can edit each measure and add the logic to do th...
Anonymous
5 years agoNot applicable
Hello Anonymous ,
You can refer this,
https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
Anonymous
5 years agoNot applicable
Yes, but how do I write 20 measures that simply refer to the [Duration] measure without repeating the logic 20 times?
I'm after something like this:
[Duration in HHMMSS](@seconds) = ** logic to convert seconds to HH:MM:SS **
[Time 1 (hh:mm:ss] = [Duration in HHMMSS]([Time 1 (s)])
[Time 2 (hh:mm:ss] = [Duration in HHMMSS]([Time 2 (s)])
[Time 3 (hh:mm:ss] = [Duration in HHMMSS]([Time 3 (s)])
etc.