Forum Discussion
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.
- Anonymous8 years ago
jmorrell,
It seems that the rows for ID 2 should be as follows.
Please check the detailed steps in the PBIX file below.
https://1drv.ms/u/s!AhsotbnGu1Nok1yu_Ho33gpCh2fj
Regards,
Lydia
2 Replies
- AnonymousNot applicable
jmorrell,
It seems that the rows for ID 2 should be as follows.
Please check the detailed steps in the PBIX file below.
https://1drv.ms/u/s!AhsotbnGu1Nok1yu_Ho33gpCh2fj
Regards,
Lydia- jmorrellRegular Visitor
Correct, it should have gone that way. I must have got a little hasty in my copy/pasting.
Thank you, this worked just fine