Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi
I have this column in a tableau dashboard that I built and I was wondering how I convert the data in the same way. I am trying it through the custom column in Power Bi. My calculation in Tableau was
STR(INT(SUM([Total Display Time])/86400))
+ " Days, " +
IF (INT(SUM([Total Display Time])%86400/3600))
< 10 THEN "0" ELSE "" END + STR(INT(SUM([Total Display Time])%86400/3600))
+ " Hours, " +
IF INT(SUM([Total Display Time])%3600/60)
< 10 THEN "0" ELSE "" END + STR(INT(SUM([Total Display Time])%3600/60))
+ " Minutes, " +
IF INT(SUM([Total Display Time]) %3600 %60)
< 10 THEN "0" ELSE "" END + STR(INT(SUM([Total Display Time]) %3600 %60))
+ " Seconds "
Could someone possibly help me convert this to a Power BI to end with the same results?
TIA
Solved! Go to Solution.
@Anonymous
Try create this using dax with calculate column:
@Anonymous
Try create this using dax with calculate column:
@Anonymous , In power query
Duration(Number.IntegerDivide(Number.FromText([Cycle:duration]),86400) ,Number.IntegerDivide(Number.Mod(Number.FromText([Cycle:duration]),86400),3600),
Number.IntegerDivide(Number.Mod(Number.Mod(Number.FromText([Cycle:duration]),86400),3600),60),
Number.Mod(Number.Mod(Number.Mod(Number.FromText([Cycle:duration]),86400),3600),60)
)
DAX - Measure or column both will work
Quotient([Total Display Time],86400) & ":" Quotient(mod([Total Display Time],86400),3600) &":" & Quotient(mod(mod([Total Display Time],86400),3600),60) &":" & mod(mod(mod([Total Display Time],86400),3600),60)
Unfortunately this didn't work in my custom column am I doing something wrong?
Thanks
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |