Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to Split a Duration Column into Separate Columns for Days, Hours and Minutes?

 
1 ACCEPTED SOLUTION
Uzi2019
Super User
Super User

Hi @Anonymous 
I have taken your sample data for example. please the follwing steps in PQ:
1) duplicate 2 time same column 

Uzi2019_0-1698916439910.png

2) make sure its is in duration data type all 3 columns

Uzi2019_1-1698916537524.png

3)right click on column> Tarnsform > day

Uzi2019_2-1698916601942.png

 

4) then you will get only Days. do the same for hour and mints.

Uzi2019_3-1698916663344.png

   5) after doing for hour and minus you will get the desired result.

 

I hope i answered your question.



Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

7 REPLIES 7
Uzi2019
Super User
Super User

Hi @Anonymous 
I have taken your sample data for example. please the follwing steps in PQ:
1) duplicate 2 time same column 

Uzi2019_0-1698916439910.png

2) make sure its is in duration data type all 3 columns

Uzi2019_1-1698916537524.png

3)right click on column> Tarnsform > day

Uzi2019_2-1698916601942.png

 

4) then you will get only Days. do the same for hour and mints.

Uzi2019_3-1698916663344.png

   5) after doing for hour and minus you will get the desired result.

 

I hope i answered your question.



Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Anonymous
Not applicable

.

AnthonyJoseph
Resolver III
Resolver III

@Anonymous  You can try using Splitter.SplitTextByAnyDelimiter  to split a column using multiple delimiter as shown below:

 

= Table.SplitColumn(Source, "Duration",  Splitter.SplitTextByAnyDelimiter({".",":"}, QuoteStyle.Csv), {"Days", "Hours","Minutes"})

 

 

AnthonyJoseph_0-1698856819858.pngAnthonyJoseph_1-1698856840424.png

 

Hope this answers your question...

 

Anonymous
Not applicable

.

Hi @Anonymous, might be because of the column name. Can you try renaming the column name to be "Duration" i.e. removing space and special characters.

rsbin
Super User
Super User

@Anonymous ,

Please try it this way.

In your first step, split by Delimiter, but use a period ".", not the colon.
That will give you Days, then a second column with the remainder. 

Then split this column by Delimiter again, but use the Colon ":" this time.

rsbin_0-1698855999899.png

Then you can delete the Seconds column if it of no use in your Report.

Trust this helps you on your way.

Regards,

Anonymous
Not applicable

.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.