How to Create and Use Slicers in Power BI (Step-by-Step)
Written by co-founder Kasper Langmann, Microsoft Office Specialist.
With a Power BI slicer, you can visually filter the data displayed on reports.
If you’ve been working with Excel for a long time, then you might already be familiar with slicers.
But unlike in Excel, it’s super easy to create and use slicers in Power BI.
In fact, the process is the same as putting up visuals when making a Power BI report.
In this article, we’ll give you a walkthrough on how to create and use Power BI slicers.
Let’s get started! 😁
*This tutorial is for Power BI Online (also called "Power BI Service").
Table of Content
Introduction to Power BI Slicers
In simple terms, Power BI slicers are visual filters.
By default, Power BI reports are interactive. Each visual on a report canvas would respond to a single click you make on a report and highlight the data relevant to what you clicked.
With a slicer, your users could choose the type of data they would like to see on the report and it would reflect immediately.
Usually, you would want to use a slicer to:
- Show important filters on the reports
- Hide unimportant or unnecessary data in the tables
- Create visually stimulating reports without repetition of data
- Make filtering easier without a drop-down list
- Make focused reports by placing the slicers next to import report visuals
Power BI slicers also have some limitations:
- Only in reports (can’t be pinned to a dashboard)
- No drill-down
- No input fields
- No visual level filters
Regardless of its limitations, Power BI slicers are a great way to visually filter your data on reports easily.
Creating a Power BI Slicer
Like what you’ve read earlier, creating a Power BI slicer is the same as adding a visual when creating a report.
You can only add a slicer using Power BI’s reports builder:
For this tutorial, we’ll be using the “Retail Analysis Sample”.
This data set contains data about retail sales of items sold across different stores and districts. There’s data about this year’s performance, last year’s sales, units, gross margin, variance, and others.
Let’s assume that you made a new report with visuals on “This Year Sales by StoreNumberName” as well as “This Year Sales and Last year Sales by FiscalMonth”.
Now, you would like to add a slicer so you can filter the data based on district managers.
To start, click the slicer icon on the visualizations pane:
You’ll immediately see a blank slicer visual on your canvas.
To add the contents, turn your attention to the fields pane.
Select ‘District’ and then ‘District Manager’:
Congratulations! You just made your first Power BI slicer.
As you can see below, the slicer works as expected:
Now that there’s a slicer, your users can filter the data shown based on the district manager.
Formatting a Power BI Slicer
At first, your slicer might look plain enough.
But there are lots of formatting options you can try.
To format your slicer, click the ‘Format’ icon on the visualizations pane:
Here, you’ll see the different ways you can format your slicer:
- General
- Selection controls
- Slicer header
- Items
- Title
- Background
- Lock aspect
- Border
Let’s say you would like to adjust the slicer header and make it larger.
Just click on the ‘Slicer header’ option and change the ‘Text size’.
After changing it to “12 pt”, here’s how it looks like (plus moving the whole slicer to the upper-right corner of the canvas):
You could also make your slicer look unique by changing the ‘Orientation’ to “Horizontal” and making it “Responsive” under the ‘General’ settings:
Feel free to try all the formatting options and see how each affects the slicer. If you don’t like it, just press ‘Ctrl’ + ‘Z’ to undo your action.
Power BI Slicer for Date Range
In addition to creating a list-type slicer, there’s also a slider-type slicer for date ranges.
Let’s try it out.
Like what you did with your first Power BI slicer, click on the slicer icon on the visualizations pane.
But this time, on the fields pane, click ‘Time’ and then ‘Date’:
Cool, right? 😄
You can also change how the date is filtered:
- Between (default)
- Before
- After
- List
- Dropdown
- Relative
To do so, just hover your mouse over the slicer until you see 2 icons appear on the upper-right corner of the slicer.
Click the dropdown icon and select the type of slicer you would like to use:
You can also do the same with the list-type slicer:
Awesome! As of now, these are the types of slicers available in Power BI. There’s a possibility that Microsoft would add more in the future.
Conclusion
Using Power BI slicers is an effective way to filter your dataset on the report canvas itself. By using them wisely, you would be able to show the significant parts of your data.
Unlike in Excel, Power BI slicers look good right off the bat not to mention the number of formatting options available. Try it out on your reports and make a positive impact on your visualizations. 👍