How to add slicers to a pivot table
Pivot table slicers provide the same function as filters – they allow you to selectively display and hide the items that appear in fields. However, instead of drop-down menus, they provide large friendly buttons that are always visible.
Lets take a look.
Here we have a pivot table that shows sales by product. If we wanted to filter the entire pivot table by region, we know from an earlier video that we could just add region as a Report Filter, and use it to filter as needed.
Slicers work the same way as report filters, but they are easier to use.
To show how slicers work, let’s add a slicer for Region, and and try it out.
To add a slicer to your pivot table, select a cell in the pivot table and navigate the options tab on the PivotTable Tools ribbon. Then click the Insert Slicer button and select a field from the field list. We’ll check Region, and click OK.
Slicers provide buttons that work just like filters. Click a button to show only that item in the pivot table. Note that the pivot table immediately filters on that item and the Region drop-down displays the filter icon. If we check the filter settings for region, you can see that the slicer had the same effect as manually filtering.
To enable more than one item at a time, hold down the control key as you click the buttons. You can also use the shift key to enable all items between two buttons.
Again, the Report Filter is updated to match the slicer.
Slicers are directly connected to fields in a pivot table. If we add Region as a column label, then filter on that field, the slicer responds as well.
To clear a filter set by a slicer, click cancel filter icon in the upper right.
You can easily add more than once slicer to a pivot table. Let’s add Category as a row label above Product, then add another slicer for Category.
As before, use the control key to enable multiple values. Notice that the field filter settings match the slicer.
There is no requirement that a slicer field be included in the pivot table. We can remove both category and region from the pivot table, and the slicer continues to function normally.
Use the clear filter button to reset a slicer, or you can Clear all filters at once using the Clear button on the ribbon.
To remove a slicer from your worksheet, just select the slicer and delete.