Forum Discussion
Stacking Columns in Power BI
- 3 years ago
Anonymous here is a quick video on how I implemented it. Make sure all your data types are correct before unpivoting.
https://www.mediafire.com/file/m7shua0kqw0aacs/Unpivot_columns.mp4/file
(this is an instant video link. It may expire over some time)
Let me know if you need any more help on this.
Cheers,
Manendra.
Hi Anonymous
You need to do this in the Power query editor.
Step1: Click on Transform data (Power query editor will open)
Step2: Select the two colour columns (Color_1 & color_2)
Step3: Go to Transform Tab > select Unpivot columns
Now your columns will be transposed to one column.
Step4: Delete the attribute column
Step5: Select the Values colum and replace the blank values with null
Step6: Select the Values Column again and go to Transform Tab and select Fill Down.
Step7: Rename your Values Column to Color_Stack
Let me know if you need further help on this.
Cheers,
Manendra.
- Anonymous3 years agoNot applicable
Thanks for the guidance. When the Color_1 and Color_2 columns both had colors listed, it worked. However, if only Color_1 has a color, all of the other columns in the data table become filled with "Error" cells. Any suggestions on how to remedy this problem?
- Manendra3 years agoAdvocate I
Anonymous here is a quick video on how I implemented it. Make sure all your data types are correct before unpivoting.
https://www.mediafire.com/file/m7shua0kqw0aacs/Unpivot_columns.mp4/file
(this is an instant video link. It may expire over some time)
Let me know if you need any more help on this.
Cheers,
Manendra.