Tuesday, December 5, 2017

A workaround to setting default slicer values in Power BI

There’s a User Voice issue to add an option to set a default slicer value in Power BI, but the feature is not there yet.

There is however a workaround which is not too hard. When you add a slicer to a report you can select values in it, and the selected values will be selected by default when the report is first opened. Next is to hide the slicer control.

First add a slicer to your report, and select the values you want to filter on.

image

Next, add a white rectangle, which you overlay on top of the slicer to hide it.

image

Publish and you’re all set :) You might see a small fade where the slicer is visible for a second, but at least the user cannot change it. To reduce this effect you can reduce the size as much as possible before overlaying with the white box, or move it more off the screen.