Forum Discussion
Pivoting
I actually want to plot this data on a matrix visual, Account Name on Rows; Years on column and Sales (plus many more fields) on the values. I have a measure, which I will put on values for the Year.
Something like this (I didn't try to refer the data I used in my initial thread for this post, sorry):
| Account Name | 2016 | 2017 | 2018 | 2019 | Sales | Revenue |
| Account 1 | Y | Y | 4569 | 4359 | ||
| Account 2 | Y | Y | 34533 | 35434 | ||
| Account 3 | Y | Y | Y | 43856 | 54646 |
I am not sure how to do this mix and match i.e. some fields going on columns well and some on values well. Maybe there is a custom visual, which does this kind of report.
Thanks again for your prompt help.
-SN
Hi Anonymous,
In terms of wondering if there is a better visualization for what you are looking for, someone with more experience than me may have another idea.
However, to answer your first post (creating columns from rows with a dynamic quantity of columns that will change with the data), I did something similiar here:
https://community.powerbi.com/t5/Desktop/Reorder-rows/m-p/693066#M334243
Let me know if you have questions about adjusting the code to fit your needs; the underlying concept is the same but your column header requirements are slightly different.
Best,
Bekah