Create and use a button slicer

Applies to: ✅ Power BI Desktop and Power BI service

The button slicer displays selectable values as customizable buttons in horizontal, vertical, or grid layouts. Add images and labels to give readers more context as they browse and filter your report. Format button states and apply conditional formatting to distinguish selections and highlight data values.

Highlight values provide context about which options are available and help you disable invalid options to guide readers toward valid selections.

For the option to organize current selections, see Show selected first.

Create a button slicer

Open your report in Power BI Desktop or in editing mode in the Power BI service, and then follow these steps:

  1. With nothing selected on the report canvas, select Button slicer in the Visualizations pane.
  2. With the slicer selected, select the field you want to filter by in the Data pane.
  3. Select Format visual in the Visualizations pane to customize the slicer's appearance and settings.

Customize button layout

In the Multi-button layout section of the Format pane, you can control how buttons are sized within the visual container.

Fixed size

Toggle Fixed size on to specify the exact pixel dimensions for each button. When the visual container isn't large enough to display all buttons at the specified size, scroll bars appear automatically. As you resize the visual, buttons maintain their specified dimensions rather than scaling proportionally.

  • For Vertical arrangement, set the Height value in pixels.
  • For Horizontal arrangement, set the Width value in pixels.
  • For Grid arrangement, set both Height and Width values in pixels.

Fit to space

Fit to space (renamed from Autogrid) controls how buttons fill the visual container:

  • On: Buttons grow or shrink to fill the visual container based on the buttons present. No space is reserved for unoccupied slots.
  • Off: The visual reserves space for the specified number of buttons, even when fewer buttons exist.

Fixed size and Fit to space are mutually exclusive. When Fixed size is enabled, Fit to space is disabled since dimensions are now controlled explicitly.

Use visual highlights

The measure you add to Highlight label provides context for determining whether each button's option is still valid as filters change. Use these highlight values to distinguish available options and disable invalid choices.

  1. Select the button slicer, and open Build visual in the Visualizations pane.
  2. Drag a measure from the Data pane to Highlight label. Each button displays the measure's value below its main value.
  3. Select a data point in another visual that interacts with the slicer. Related buttons remain highlighted, while unrelated options appear dimmed or inactive.

Screenshot of a button slicer highlighting valid selections.

Use conditional formatting

Use conditional formatting to change the appearance of buttons based on data values. For example, set button background colors to indicate performance against a target.

  1. Select the button slicer, and open Format visual in the Visualizations pane.
  2. Under Visual > Buttons > Background, select fx next to Fill color.
  3. Choose a format style and the field to base it on, configure the formatting, and select OK.

Conditional formatting also supports callout values, callout labels, button borders, and button effects.

For details about format styles and rules, see Conditional formatting in Power BI visuals.

Paste values to select

The Button slicer supports pasting values to quickly select multiple items at once. Copy values from external sources like Excel or Notepad, with each value on its own line, and paste them directly into the slicer to apply matching selections.

For detailed instructions on using the paste feature, see Paste values in slicers.

Considerations and limitations

The following considerations and limitations apply to the button slicer in Power BI Desktop and the Power BI service.

  • Sorting: The ellipsis menu supports sorting by Value, but not Label.
  • Single select: When Force selection is off, hold Ctrl to select multiple items even if Single select is on.
  • Force selection: Requires Single select to be on and keeps one item selected. Ctrl doesn't allow additional selections.
  • Hidden selections: Filters that hide selected items don't clear their selections. With Force selection on, the hidden selection remains active until you select another item. The slicer doesn't automatically select the first visible item.