Forum Discussion

jmorrell's avatar
jmorrell
Regular Visitor
8 years ago
Solved

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.

2 Replies