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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PhillipB
Frequent Visitor

Complicated unpivot

I have a set of data that needs to take several columns bring them all in to one column but also then to copy the data from the other columns that they match and copy it down.

 

The data initially reads like this:

 

        Date 1 Date 2 Date 3
XX234 XX235 XX236 XX279 21/11/2022 22/11/2022 23/11/2022
XY236 XZ235 YX236 XT279 22/11/2022 26/11/2022 31/11/2022
XB234 XB235 XX238 XV279 21/11/2022 24/11/2022 25/11/2022
RX244 RX235 YX236 PX279 22/11/2022 23/11/2022 23/11/2022

 

And it needs to ready like this

          Date 1 Date 2 Date 3
XX234 21/11/2022 22/11/2022 23/11/2022
XY236 22/11/2022 26/11/2022 31/11/2022
XB234 21/11/2022 24/11/2022 25/11/2022
RX244 22/11/2022 23/11/2022 23/11/2022
XX235 21/11/2022 22/11/2022 23/11/2022
XZ235 22/11/2022 26/11/2022 31/11/2022
XB235 21/11/2022 24/11/2022 25/11/2022
RX235 22/11/2022 23/11/2022 23/11/2022
XX236 21/11/2022 22/11/2022 23/11/2022
YX236 22/11/2022 26/11/2022 31/11/2022
XX238 21/11/2022 24/11/2022 25/11/2022
YX236 22/11/2022 23/11/2022 23/11/2022
XX279 21/11/2022 22/11/2022 23/11/2022
XT279 22/11/2022 26/11/2022 31/11/2022
XV279 21/11/2022 24/11/2022 25/11/2022
PX279 22/11/2022 23/11/2022 

23/11/2022

 

 

Column 2-4 is moved down sequentially with the dates information then also copied down in to the columns to maintain the relationship. 

1 ACCEPTED SOLUTION
ddpl
Solution Sage
Solution Sage

@PhillipB try "unpivot only selected column"as per below

 

ddpl_0-1670412194894.png

View solution in original post

2 REPLIES 2
PhillipB
Frequent Visitor

Thanks for the help

ddpl
Solution Sage
Solution Sage

@PhillipB try "unpivot only selected column"as per below

 

ddpl_0-1670412194894.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.