Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
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 |
|---|---|
| 49 | |
| 37 | |
| 31 | |
| 22 | |
| 19 |
| User | Count |
|---|---|
| 132 | |
| 100 | |
| 56 | |
| 37 | |
| 37 |