Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |