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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
Community Champion
Community Champion

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
Community Champion
Community Champion

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.