Edit

Share via


Slicers in Power BI

APPLIES TO:  Power BI Desktop  Power BI service

Suppose you want readers to view overall sales metrics and highlight performance by district manager and time frame. You could create separate reports, build comparative charts, or add filters in the Filters pane. Or use slicers. Slicers filter data directly on the report page. They narrow the portion of the semantic model shown in the other visuals.

Screenshot of an animated Power BI slicer filtering related visuals on a report page.

This article shows you how to create and format a basic slicer by using the free Retail Analysis Sample. It also covers controlling which visuals a slicer affects, syncing slicers across pages, and filtering and formatting slicers.

These other articles explain how to make specific types of slicers:

When to use a slicer

Use slicers to:

  • Show commonly used filters on the report canvas for quick access
  • Show the current filter state without opening a drop-down list
  • Filter by columns that are hidden in data tables
  • Create focused reports by placing slicers next to key visuals

Power BI slicers don't support:

  • Input fields
  • Drill-down options

Create a slicer

This slicer filters data by district manager. To follow along, download the Retail Analysis Sample PBIX file.

  1. Open Power BI Desktop, and from the menu bar, select File > Open report.
  2. Browse to the Retail Analysis Sample PBIX.pbix file and select Open.
  3. In the navigation pane, select the Report icon to open the file in report view.
  4. On the Overview page, with nothing selected on the report canvas, select the Slicer icon in the Visualizations pane to create a slicer.
  1. With the slicer selected, in the Fields pane, expand the District table and select DM to populate it.

  2. Resize or move elements on the canvas to make room for the slicer. If the slicer is too small, items are cut off.

    The new slicer is now populated with a list of district manager names and their selection boxes.

    Screenshot of Slicer populated with district manager names.

  3. Select names on the slicer to filter other visuals. Select a name again to clear it, or hold Ctrl to select multiple names. Selecting all names has the same effect as selecting none.

    Screenshot of vertical slicer with three names selected and report filtered.

Control which page visuals slicers affect

By default, slicers on a report page filter all other visuals on that page, including other slicers. When you choose values in the list and date slicers, the other visuals update. Power BI filters data to the intersection of the selected slicer values.

Use visual interactions to exclude some page visualizations from being affected by others. For example, in the Retail Analysis sample on the Overview page, the Total Sales Variance by FiscalMonth and District Manager chart shows comparative data for district managers by month that you might want to keep visible. Use visual interactions to keep slicer selections from filtering this chart.

  1. Select the District Manager slicer on the Overview page of the Retail Analysis sample report.

  2. On the ribbon, go to Format, and then select Edit interactions.

    Screenshot of the Edit interactions button in Power BI Desktop.

Filter controls with Filter and None options appear above the other visuals on the page. The Filter option is selected by default.

  1. Select None in the filter control above the Total Sales Variance by FiscalMonth and District Manager chart to stop the District Manager slicer from filtering it.

Learn more in Change how visuals interact in a Power BI report.

Sync and use slicers on other pages

You can sync a slicer and use it on any or all pages in a report.

The District Monthly Sales page has a District Manager (or DM) slicer. You might also want that slicer on the New Stores page. The New Stores page has a slicer, but it provides only Store Name information. With the Sync slicers pane, you can sync the District Manager slicer to these pages, so that slicer selections on any page affect visualizations on all three pages.

  1. In Power BI Desktop on the View ribbon, select Sync slicers.

    Screenshot of Sync slicers selection in Power BI Desktop.

    The Sync slicers pane appears between the Filters and Visualizations panes.

    Screenshot of Sync slicers pane.

  1. On the District Monthly Sales page of the report, select the District Manager slicer.

    Because you already created a District Manager slicer on the Overview page, the Sync slicers pane appears like this:

    Screenshot of Sync District Monthly Sales slicer.

  2. In the Sync column of the Sync slicers pane, select the Overview, District Monthly Sales, and New Stores pages.

    This selection causes the District Monthly Sales slicer to sync across these three pages.

  3. In the Visible column of the Sync slicers pane, select the New Stores page.

    This selection makes the District Monthly Sales slicer visible on these three pages. The Sync slicers pane now appears like this:

    Screenshot of Select pages in Sync slicers.

  4. Observe the effects of syncing. On the District Monthly Sales page, the District Manager slicer shows the same selections as on the Overview page. On the New Stores page, the District Manager slicer is visible, and its selections affect what's shown in the Store Name slicer.

    Tip

    Although the slicer initially appears on the synced pages at the same size and position as on the original page, you can move, resize, and format synced slicers on the various pages independently.

    Note

    If you sync a slicer to a page but don't make it visible on that page, slicer selections made on the other pages still filter the data on the page.

Sync separate slicers

You can also sync two or more separate slicers. Syncing slicers is useful when working with composite models, as you might want to make the same selection across sources without relying on cross-source group relationships. To sync two or more separate slicers, you mark them as being part of a group.

  1. Make sure the Sync slicers pane is visible by selecting it from the View menu.

    Screenshot of Sync slicers pane.

  2. Select one of the slicers that you want in the group. In the Sync slicers pane, expand Advanced options, and enter a name for the group. You can name it anything you want.

    Screenshot of entering a group name in the Advanced section of the Sync slicers pane.

  3. Then select another slicer you want to sync with the first, and enter the same name in the group name box. Be sure to enter it exactly the same.

  4. Make sure to select either Sync field changes to other slicers, Sync filter changes to other slicers, or both depending on your scenario.

    • If you just want to keep the slicers in sync so filters set by the slicers are kept in sync, select Sync filter changes to other slicers.
    • If you also want to make sure that any changes you make to the field on which the slicers are based get synced across the group, select Sync field changes to other slicers.
  5. Test that the sync works the way you want by changing the selection in one of the slicers. Observe that it gets updated in the other slicer in the group.

Filter slicers

Apply visual-level filters to a slicer to reduce the list of values it shows. For example, filter out blank values from a list slicer or certain dates from a range slicer. Filtering a slicer only changes the values shown in the slicer, not the filter it applies to other visuals when you make a selection. For example, apply a filter to a range slicer to show only certain dates. The selection in the slicer only shows the first and last dates from that range, but you still see other dates in your other visuals. When you change the selected range in the slicer, you see the other visuals update. Clear the slicer to show all dates again.

Learn more about visual-level filters in Filter types.

Format slicers

Different formatting options are available, depending on the slicer type. For Style, Vertical list is the default. Select Tile to produce a slicer with tiles or buttons arranged horizontally, and scroll arrows to access items that don't fit in the slicer. By using the Tile style with Responsive layout and Background coloring, you can produce buttons or tiles rather than standard list items, and make slicer items resize to fit different screen sizes and layouts.

Visual options

  1. Select the District Manager slicer, and select the Format icon Screenshot of the Format icon (paint roller) in the Visualizations pane. in the Visualizations pane.

  2. Resize the slicer so it's wide, not tall.

  3. In the Format pane, under Visual, expand Slicer settings > Options, and select Tile.

    Screenshot of a tile slicer after selecting the Tile option in Slicer settings.

    Tip

    By default, slicer list items sort in ascending order. To switch to descending order, select the ellipsis (...) in the top right corner of the slicer > Sort axis > Sort descending.

  4. Expand Slicer header and change the Title text to "District Manager".

  5. Expand Values and select a Background Color. This color is one of the theme colors, #abdae5.

    Screenshot showing tile slicer with background color.

    Tip

    • With the Tile style, deselected items show the chosen text and background colors. Selected items use the system default, usually a black background with white text.
    • With the Vertical list style, items always show the selected colors, and selected check boxes are always black.

Responsive layout

After you select the Tile style, turn On Responsive layout to change the size and arrangement of slicer items based on the view screen and slicer size.

Screenshot of selecting responsive layout.

Responsive layout works only for tile and numeric range slicers, not for vertical list slicers. For more information about responsive layouts, see Create a responsive slicer you can resize.

For range slicers, responsive formatting changes the slider style and lets you resize more flexibly. Read more about numeric range slicers.

Selection controls

  • The Show "Select all" option is Off by default. Under Selection, turn Show "Select all" option to On to add a Select all item to the slicer. Use it to select or deselect all items at once. When all items are selected, selecting one item deselects it, which allows an is-not filter.

    Screenshot of adding a Select all option to a slicer.

  • Single select is Off by default. Select an item to select it. Hold Ctrl to select multiple items. Select an item again to deselect it.

    When Single select is On, you can select only one item. In vertical list slicers, the check boxes become radio buttons.

Title options

The Title text in Slicer header is On by default. This selection shows the data field name at the top of the slicer. You can edit the title text, which is especially useful for hierarchy slicers. See Change the title text in the article "Add multiple fields to a hierarchy slicer" for details.

Title on the General tab is another option. It's Off by default.

Other formatting options

Other formatting options are Off by default. Turn On these options to control them:

  • Lock aspect: Keep the relative height and width of the slicer if it's resized. Under General > Properties > Size.

  • Background: Add a background color to the slicer and set its transparency. Under General > Effects.

  • Border: Add a border around the slicer and set its color. Under General > Effects.

    There's also a Border option on the Visual tab. It adds a border either over, under, or next to each option in the slicer. It's separate from and unaffected by the General settings.

  • Shadow: Add a drop shadow to the slicer. Under General > Effects.

Learn more about slicers in these articles: