Forum Discussion
Anonymous
2 years agoNot applicable
Using a calculated duration in visuals - is this now possible?
So I had a total seconds measure, that using dax I put into a duration of days:hours:minutes:seconds, but I can not use that in any visuals. I know years ago when I tried doing things like this there...
- Anonymous2 years ago
Hi Anonymous
Based on your needs, I have created the following form.
You can use the following dax to get the result you want
Measure = VAR TotalSeconds = SELECTEDVALUE('Table'[seconds]) VAR Seconds = MOD(TotalSeconds, 60) VAR Minutes = MOD(INT(TotalSeconds / 60), 60) VAR Hours = MOD(INT(TotalSeconds / 3600), 24) VAR Days = INT(TotalSeconds / 86400) RETURN FORMAT(Days, "00") & " days " & FORMAT(Hours, "00") & ":" & FORMAT(Minutes, "00") & ":" & FORMAT(Seconds, "00")Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Great idea! Exactly the kind of relatively new feature I was looking for. I got it to work with this method, but I noticed that in the axis, the scale labels are not appearing as the should. They all just appear as the max number in the visual. Are you familar with this bug, and any possible workarounds?
Thanks!
ajohnso2
Solution Supplier
2 years agoI'm logged off for the day now, if you could post a sample pbix I can take a look tomorrow