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

Pivoting data when columns need to be split

I have an issue I've been digging at but can't seem to get where I need to go.  I'm newish to PowerBI and I could use a helping hand.

 

I have a query with 3 columns:

-ID

-Model

-Platform

 

Currently, the ID column contains only unique whole number values and the Model and Platform contain model numbers of materials and their model groups.  There are multiple models and multiple groups in each cell per ID, and each piece is paired (IE, the first model matches the first platform, second with second, etc .  So it looks something like this.

 

ID   Model   Platform

1   wx34,rx35  w,rx

2  rx55,ssw34,ssw34   rx,ssw,ssw

3  ssw22  ssw

 

What I'm trying to is break out the query and have each paired model and platform  to be its own row, like this:

 

ID   Model   Platform

1   wx34   w

1   rx35   rx

2   rx55   ssw34

2   ssw34  ssw34

2   ssw34  ssw34

3  ssw22  ssw

 

etc

 

Any help and/or insight would be beneficial.  I'm new to the forum so if I need to provide other info let me know.

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-yuezhe-msft
Moderator

Re: Pivoting data when columns need to be split

@jmorrell,

It seems that the rows for ID 2 should be as follows.
2.PNG

Please check the detailed steps in the PBIX file below.
https://1drv.ms/u/s!AhsotbnGu1Nok1yu_Ho33gpCh2fj

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Moderator v-yuezhe-msft
Moderator

Re: Pivoting data when columns need to be split

@jmorrell,

It seems that the rows for ID 2 should be as follows.
2.PNG

Please check the detailed steps in the PBIX file below.
https://1drv.ms/u/s!AhsotbnGu1Nok1yu_Ho33gpCh2fj

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jmorrell Frequent Visitor
Frequent Visitor

Re: Pivoting data when columns need to be split

Correct, it should have gone that way.  I must have got a little hasty in my copy/pasting.

 

Thank you, this worked just fine