cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
danielrsnyder Frequent Visitor
Frequent Visitor

Transform data from rows to columns when the column headers repeat?

I have data that comes out as shown below (Raw Data), however, all of the ratings are listed in rows based on the individual/customer record they are on. I want each rating to be under the first set of columns (Desired Output). Any ideas? Thanks in advance.

 

Raw Data

Customer IDRating Unique IDRating Added ByDate AddedDate Last ChangedLast Changed By Source Category DescriptionRating Unique ID_1Rating Added By_1Date Added_1Date Last Changed_1Last Changed By_1 Source_1 Category_1 Description_1
100001-592-0000172109dsnyder11/20/201511/20/2018dsnyderFake Source AFake Rating AFake Description AWP_18423_11dsnyder11/20/201511/20/2018dsnyderFake Source AFake Rating AFake Description A
200001-592-0000127359dsnyder4/1/20145/10/2019dsnyderFake Source BFake Rating BFake Description BWP_24657_11dsnyder7/2/201411/12/2018dsnyderFake Source BFake Rating BFake Description B
300001-592-0000126441dsnyder10/7/20135/10/2019dsnyderFake Source AFake Rating AFake Description CWP_24773_11dsnyder7/2/20148/22/2018dsnyderFake Source AFake Rating AFake Description C
400001-592-0000172098dsnyder11/19/20152/19/2019dsnyderFake Source BFake Rating BFake Description AWP_2956_19dsnyder3/2/20162/19/2019dsnyderFake Source BFake Rating BFake Description A
500001-592-0000172130dsnyder11/24/20152/20/2019dsnyderFake Source AFake Rating AFake Description BWP_5392_19dsnyder3/2/20162/20/2019dsnyderFake Source AFake Rating AFake Description B
600001-592-0000172096dsnyder11/19/20158/9/2018dsnyderFake Source BFake Rating BFake Description Cnullnullnullnullnullnullnullnull
700001-592-0000172116dsnyder11/20/20158/29/2018dsnyderFake Source AFake Rating AFake Description Anullnullnullnullnullnullnullnull

 

Desired Output

Customer IDRating Unique IDRating Added ByDate AddedDate Last ChangedLast Changed By Source Category Description
100001-592-0000172109dsnyder11/20/201511/20/2018dsnyderFake Source AFake Rating AFake Description A
200001-592-0000127359dsnyder4/1/20145/10/2019dsnyderFake Source BFake Rating BFake Description B
300001-592-0000126441dsnyder10/7/20135/10/2019dsnyderFake Source AFake Rating AFake Description C
400001-592-0000172098dsnyder11/19/20152/19/2019dsnyderFake Source BFake Rating BFake Description A
500001-592-0000172130dsnyder11/24/20152/20/2019dsnyderFake Source AFake Rating AFake Description B
600001-592-0000172096dsnyder11/19/20158/9/2018dsnyderFake Source BFake Rating BFake Description C
700001-592-0000172116dsnyder11/20/20158/29/2018dsnyderFake Source AFake Rating AFake Description A
1WP_18423_11dsnyder11/20/201511/20/2018dsnyderFake Source AFake Rating AFake Description A
2WP_24657_11dsnyder7/2/201411/12/2018dsnyderFake Source BFake Rating BFake Description B
3WP_24773_11dsnyder7/2/20148/22/2018dsnyderFake Source AFake Rating AFake Description C
4WP_2956_19dsnyder3/2/20162/19/2019dsnyderFake Source BFake Rating BFake Description A
5WP_5392_19dsnyder3/2/20162/20/2019dsnyderFake Source AFake Rating AFake Description B
6nullnullnullnullnullnullnullnull
7nullnullnullnullnullnullnullnull
1 ACCEPTED SOLUTION

Accepted Solutions
Super User I
Super User I

Re: Transform data from rows to columns when the column headers repeat?

Take a look at the attached file. Basically just split the table and then append back into itself

Transform data from rows to columns when the column headers repeat.pngFile:

https://1drv.ms/u/s!Amqd8ArUSwDS3SCb8a1zPqvlVyuP?e=1mD04A

View solution in original post

2 REPLIES 2
Super User I
Super User I

Re: Transform data from rows to columns when the column headers repeat?

Take a look at the attached file. Basically just split the table and then append back into itself

Transform data from rows to columns when the column headers repeat.pngFile:

https://1drv.ms/u/s!Amqd8ArUSwDS3SCb8a1zPqvlVyuP?e=1mD04A

View solution in original post

danielrsnyder Frequent Visitor
Frequent Visitor

Re: Transform data from rows to columns when the column headers repeat?

Thanks @Nick_M, that works beautifully!

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors