How to Add a Slicer in Power BI

Do you want to know how to use a slicer in Power BI? Well, In this Power BI tutorial, I have explained, what is a slicer in Power BI, why we use a slicer in Power BI, and how to add a slicer in Power BI.

Also, we will cover the topics below:

  • Various types of slicers in Power BI
  • How to clear slicer filter in Power BI

Power Bi Slicer

  • Power Bi Slicer is another way of filtering, which helps users to filter and sort the information they want from the Power Bi report.
  • For example, if we have a Power Bi sales report, we can use the slicer to filter the sales data based on the Product or based on the country.

Also Read: How to Add a Dropdown Slicer in Power BI

Why do we use Power Bi Slicer?

  • To display the currently applied filter data without opening the filters pane window.
  • For easy access, filter the important data in the Power Bi report canvas.
  • To filter and sort the columns to eliminate the hidden or unneeded data in the tables.

Steps to Add slicer in Power Bi

Now let us see how to add the slicer and use the slicer visual to filter the data presented in the Power Bi report in Power Bi.

In this example, I have used the sales table data, to filter the based on the slicer visual in Power Bi.

  • Open the Power Bi desktop, and load the data into it using the get data option. Once the data has been loaded, create a power bi visualization by selecting the data fields from the fields pane.
  • Now, Click on the slicer icon presented in the visualization pane below:
How to add a slicer in Power Bi
How to add a slicer in Power Bi
  • In the slicer visual, drag and drop the Product field name from the field pane for which you filter it.
add a slicer in Power Bi example
add a slicer in the Power Bi example
  • In the below screenshot, you can see that the Slicer visual has the Product name and the clustered column chart displays the sales by product name in the Power Bi report canvas.
add a slicer in the Power Bi
add a slicer in the Power Bi
  • Now if we select any product name from the slicer visual, it filters the data for the other visual presented in the Power Bi report canvas.
add a slicer in the Power Bi example
add a slicer in the Power Bi example

This is how to add the slicer and use the slicer visual to filter the data presented in the Power Bi report in Power Bi.

Check Out: How to Add a Date Slicer in Power BI

Types of Slicers in Power Bi

There are five types of slicers in Power Bi, and they are listed below:

  1. Numeric range slicer
  2. Relative date slicer.
  3. Relative time slicer.
  4. Responsive, resizable slicer.
  5. Hierarchy slicer with multiple fields.

Numeric range slicer

In the Numeric range slicer, we can apply filters for any numeric value column presented in the data table. There are three options for filtering the data:

  • Between numbers.
  • Less than or equal to a number.
  • Greater than or equal to a number.
  • Power BI creates a numeric range slicer. By default, it’s set to Between number value.
  • Select the slicer icon presented in the visualization pane, In the slicer visual, drag and drop the sales field value from the field for which you filter it.
  • In the below screenshot, you can see the numeric slicer visual between the sales value. Based on the filtered number that displays the Products in the clustered column chart.
Numeric range slicers
Numeric range slicer

This is how to use the Numerics range slicer visual to filter the data value presented in the Power Bi report canvas.

Relative date slicer

In the Relative date slicer, we can apply filters for any date value column presented in the data table. In the Relative date slicer, which allows us to select the last, next, and current period data values.

Relative date slicers example
Relative date slicer example
  • Select the slicer icon presented in the visualization pane, In the slicer visual, drag and drop the order date field value from the field for which you filter it.
  • In the below screenshot, you can see the power bi filters the date for the last 5 months that displays the Products in the clustered column chart.
Example of Relative date slicers
Example of Relative date slicer

This is how to use the Relative date slicer visual to filter the data value presented in the Power Bi report canvas.

Have a look: Power BI DAX Count [15 real examples]

Responsive, resizable slicer

  • The Responsive slicer resizes to fit any space on the Power Bi report. With the responsive slicer.
  • We can resize the slicer visual to different sizes and shapes, from horizontal tile to square to vertical, and the values in the slicer visual automatically rearrange.
  • Simply, by expanding the slicer visual we can resize the slicer visual.
  • By default when you add a slicer to the Power Bi report it will be as a Vertical slicer. To convert the vertical slicer to a horizontal slicer.
  • Select the slicer and under the visual settings expand the Slicer settings and Change from Vertical slicer to Horizontal slicer as below:
Responsive, resizable slicers
Responsive, resizable slicer

In the below screenshot, you can see that the Slicer visual has been changed from a vertical slicer to a horizontal slicer.

Responsive, resizable slicers example
Responsive, resizable slicer example

This is how to resize the slicer visual presented in the Power Bi report canvas.

Hierarchy slicer with multiple fields

  • Hierarchy slicer have multiple fields inside the single slicer visual.
  • When you add multiple fields to the slicer, by default it displays an arrow or chevron next to the items that can be expanded to show the items in the next level.
  • Select the slicer icon presented in the visualization pane, In the slicer visual, drag and drop the multiple fields like Product Name, Customer Location, and sales field value from the field for which you filter it.
Hierarchy slicers with multiple fields
Hierarchy slicer with multiple fields
  • Now if we select any product name from the Hierarchy slicer visual, it filters the data for the other visual presented in the Power Bi report canvas.
Hierarchy slicers with multiple field example
Hierarchy slicer with multiple field examples

This is how to use the Hierarchy slicer visual with multiple fields to filter the data value presented in the Power Bi report canvas.

Read: Power BI Dax Min Filter [With 13 Examples]

Clear Slicer Filter in Power Bi

Now let us see how we can clear the slicer filter presented in the Power Bi report canvas in Power Bi.

Follow the below-mentioned steps:

  • Select the slicer visual for which you want to clear the slicer filter and then in the top-right corner You can see a few icons.
  • Now click on the icon which looks like an eraser to clear the selections in the power bi slicer visual (as highlighted below):
Clear Slicer Filter in Power Bi
Clear Slicer Filter in Power Bi
  • It removes the filters for the visualizations presented in the Power Bi report and clears the selection in the slicer visual.
Clear Slicer Filter in the Power Bi
Clear Slicer Filter in the Power Bi

This is how to clear the slicer filter presented in the Power Bi report canvas in Power Bi.

Furthermore,

In this Power BI tutorial, we discussed what is a slicer in Power BI, why we use a slicer in Power BI, and how to add a slicer in Power BI.

Also, we covered the topics below:

  • Various types of slicers in Power BI
  • How to clear slicer filter in Power BI
>