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
RPAI2812
Helper I
Helper I

Reorganizing data

Hi, I wanted some help to rearrange my table in Power Query 🙂
Currently, I have one column for each initial and end date for three different trips. 

 

PersonStart Trip 1End Trip 1Start Trip 2End Trip 2Start Trip 3End Trip 3
Peter01/01/202207/01/202228/01/202204/02/202216/02/202223/02/2022
Maria01/01/202207/01/202228/01/202204/02/202216/02/202223/02/2022
John06/01/202217/01/202218/02/202224/02/202208/03/202213/03/2022

 

I wanted to unpivot that so the table would like the one below. I have a column with the trip number and the start and end date from each trip.

 

PersonTripStart DateEnd Date
Peter101/01/202207/01/2022
Peter228/01/202204/02/2022
Peter316/02/202223/02/2022
Maria101/01/202207/01/2022
Maria228/01/202204/02/2022
Maria316/02/202223/02/2022
John106/01/202217/01/2022
John218/02/202224/02/2022
John308/03/202213/03/2022
1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Yes it's an Unpivot (all date columns).

Split the resulting column (by Space as far right as possible)-> that gets the numbers into a column.

Then Pivot the 'Start Trip'/End Trip' Column with Don't Aggregate

View solution in original post

1 REPLY 1
HotChilli
Super User
Super User

Yes it's an Unpivot (all date columns).

Split the resulting column (by Space as far right as possible)-> that gets the numbers into a column.

Then Pivot the 'Start Trip'/End Trip' Column with Don't Aggregate

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.

Top Solution Authors