Forum Discussion
Power Bi slicers
Hi everyone,
I'm trying to create a clustered bar chart with slicers showing cell numbers just like the one I created in excel. I added the slicer and added the months to the x axis, and tried to originally create a dynamic slicer through the modeling tab, but that didn't work. I tried transposing my data too. I included pictures of how the excel graph I have looks. This is based off of my clicking the cell "KOCS-1" then if I were to choose cell "1" then data would change to that. I have about 20-30 cells I'd like to be able to click showing the months for the year. Maybe my data isn't correctly displayed in power bi, but does anyone have an idea of how I can format it to show like the first picture shown? The other pictures show how I have my data and graphs in power bi.
thank you in advanced!
Hi Jazlynnn64 ,
Are the column names the cell numbers? If so, you need to transform your data so the cell numbers are in one column and the values in another. Your data should look something like below through Unpivot
Here's a tutorial on how to unpivot
https://databear.com/power-bi-pivot-and-unpivot-columns/
After unpivoting, you can use the attribute column in a slicer and as a category/legend.
2 Replies
- Jazlynnn64New Member
Oops! I meant to add a picture of my data!
- danextian
Super User
Hi Jazlynnn64 ,
Are the column names the cell numbers? If so, you need to transform your data so the cell numbers are in one column and the values in another. Your data should look something like below through Unpivot
Here's a tutorial on how to unpivot
https://databear.com/power-bi-pivot-and-unpivot-columns/
After unpivoting, you can use the attribute column in a slicer and as a category/legend.