Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I am new to Power BI and I am trying to figure out how to create a slicer that slices my bar graph visual by the legend of the visual. For example if I deselect one of the legend fields, the values associated with the field disappear from the visual.
Please let me know if you need more clarification.
Solved! Go to Solution.
@Anonymous
It looks like you need to unpivot your Table in Power Query.
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
I would add that Power BI is a tabular model meaning you will need a date column. Having dates on columns can be difficult to work with.
In Power Query you can transform a table and use the unpivot feature, which is super handy.
I would also mention switch is a powerful function within Power BI, but may not be suited for this case.
Hi @Anonymous
Yes we need more clarifications like screenshots or maybe a sample Pbix would be even better
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Yes, I couldn't figure out how to upload a file onto this reply so here is a screenshot. I would like to get the legend as a slicer so I can slice by date.
1. There is a slicer icon in the visuals that you can drop into the report.
2. Then drop the field you would like to slice into the slicer.
3. There is a down arrow in the right corner that can be selected to change the way the slicer works.
Video on how to add slicers:
Power BI - Slicer - YouTube
Thank you,
Jeffrey Eschright
The problem I am encountering with that method is that when I add a date into the slicer it doesn't allow me to deselect the date entirely, just the values associated with that date, as you can see here.
@Anonymous
It looks like you need to unpivot your Table in Power Query.
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
I would add that Power BI is a tabular model meaning you will need a date column. Having dates on columns can be difficult to work with.
In Power Query you can transform a table and use the unpivot feature, which is super handy.
I would also mention switch is a powerful function within Power BI, but may not be suited for this case.
In your table do you have a column date?
what do you expect to see when you added the dates to the Values field?
You can use slicer for the dates outside the Graph.
Can you share your Pibx as is through One drive or google drive or any cloud service?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Hi @Anonymous,
Currently the native graphs that come with Power BI Desktop allows the user to select a legend item within the graph and spotlight or showcase only those specific items. It will only highlight or grey out the items unselected.
My suggestion would be to create a chicklet slicer (downloadable from more visuals) or use a slicer for the legend item in place of the legend itself. (Fastest Solution)
There are ways to modify graphs using DAX or creating new visuals in python as well.
Regards,
Jeffrey Eschright
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |