Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I need to convert seconds into day hours min sec. How can I do it?
Solved! Go to Solution.
Preferably in Power Query. e.g.:
let Source = #table(type table[Seconds = Int64.Type],{{4000},{40000},{100000},{1000000}}), Day = Table.AddColumn(Source, "Day", each Number.IntegerDivide([Seconds],24*60*60), Int64.Type), Hours = Table.AddColumn(Day, "Hours", each Number.Mod(Number.IntegerDivide([Seconds],60*60),24), Int64.Type), Min = Table.AddColumn(Hours, "Min", each Number.Mod(Number.IntegerDivide([Seconds],60),60), Int64.Type), Sec = Table.AddColumn(Min, "Sec", each Number.Mod([Seconds],60), Int64.Type) in Sec
or otherwise in DAX:
DAXDay = INT(Query1[Seconds]/(24*60*60)) DAXHours = MOD(INT(Query1[Seconds]/(60*60)),24) DAXMin = MOD(INT(Query1[Seconds]/60),60) DAXSec = MOD( Query1[Seconds],60)
Preferably in Power Query. e.g.:
let Source = #table(type table[Seconds = Int64.Type],{{4000},{40000},{100000},{1000000}}), Day = Table.AddColumn(Source, "Day", each Number.IntegerDivide([Seconds],24*60*60), Int64.Type), Hours = Table.AddColumn(Day, "Hours", each Number.Mod(Number.IntegerDivide([Seconds],60*60),24), Int64.Type), Min = Table.AddColumn(Hours, "Min", each Number.Mod(Number.IntegerDivide([Seconds],60),60), Int64.Type), Sec = Table.AddColumn(Min, "Sec", each Number.Mod([Seconds],60), Int64.Type) in Sec
or otherwise in DAX:
DAXDay = INT(Query1[Seconds]/(24*60*60)) DAXHours = MOD(INT(Query1[Seconds]/(60*60)),24) DAXMin = MOD(INT(Query1[Seconds]/60),60) DAXSec = MOD( Query1[Seconds],60)
Thanks! Got it.
User | Count |
---|---|
99 | |
90 | |
85 | |
74 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |