The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
I have a table on PowerBi with 8 columns.
One column (label) lists all the quarters and years in the following format: Q1 2020, Q2 2020, Q1 2021. There are 10 unique values in this column. The other columns are repeated for each unique value, except the answer option which will change (although some may be the same).
I would like to convert this column (label) into multiple columns so that each column is showing uniqe quarter/year in the column header and the answer column is populated in the cells.
label | section | question_number | question | green | amber | red | Answer |
Q1 2022 | Finance | 9.16 | Result | >150000 | 150001 - 339999 | <149999 | 113000 |
Q2 2021 | Finance | 9.16 | Result | >150000 | 150001 - 339999 | <149999 | 125000 |
Q3 2022 | Finance | 9.16 | Result | >150000 | 150001 - 339999 | <149999 | 158900 |
Q1 2022 | HR | 10.16 | Result | <2 | 3-5 | 6 | 1 |
Q2 2022 | HR | 10.16 | Result | <2 | 3-5 | 6 | 0 |
Q3 2022 | HR | 10.16 | Result | <2 | 3-5 | 6 | 2 |
What I want:
Q1 2022 | Q2 2021 | Q3 2022 | section | question_number | question | green | amber | red |
113000 | 125000 | 158900 | Finance | 9.16 | Result | >150000 | 150001 - 339999 | <149999 |
1 | 0 | 2 | HR | 10.16 | Result | <2 | 3-5 | 6 |
How would I go about this? I am new to Powerbi so step by step guides would be really appreciated!
Thanks
Solved! Go to Solution.
HI @TracyF .
You can try Pivoting your column 'label' which in turn would turn your row into separate columns.
Refer the following video;
https://www.youtube.com/watch?v=lFd2hjkKz_Q
Thanks,
Sanket
If this post helps, then mark it as "Accept as Solution" and give it a thumbs up.
HI @TracyF .
You can try Pivoting your column 'label' which in turn would turn your row into separate columns.
Refer the following video;
https://www.youtube.com/watch?v=lFd2hjkKz_Q
Thanks,
Sanket
If this post helps, then mark it as "Accept as Solution" and give it a thumbs up.