Skip to main content

Power BI

Needs Votes

Allow Slicers to be preset based on defined criteria

Vote (158) Share
David Wilson's profile image

David Wilson on 07 Aug 2018 03:20:44

Allow Slicers to be preset based on defined criteria (i.e. DAX formula or other developer input).

For example, a dashboard that displays KPI data based on the current week end date. On displaying the dashboard the screen should default to the current end date with the user having the optional ability to set the date slicer for previous weeks.

At a stretch you could have a button with a bookmark action to run some DAX that could set the date slicer to the latest end date.

Taking this further you could also reverse and forward the slicer to the next selection (via DAX or other command/action).

Comments (5)
David Wilson's profile image Profile Picture

1b6513a7 cb5d-4557-b5da-d914285c49fa on 05 Jul 2020 23:56:50

RE: Allow Slicers to be preset based on defined criteria

It will be great if we can have a search button on slicers and selects all of them which is filtered using search button as in Excel Filter. Currently the search button is on top of the filter and nothing has been selected based on it. We need to select them one by one after it is filtered.

David Wilson's profile image Profile Picture

d19fa929 9f11-40de-902a-a54908401cfb on 05 Jul 2020 23:56:04

RE: Allow Slicers to be preset based on defined criteria

A more general solution might be to set a slicer to default to the max or min value, so it would work with more than dates.

David Wilson's profile image Profile Picture

6bcb4505 84ec-4d9b-b3e6-3983c287d93f on 05 Jul 2020 23:36:00

RE: Allow Slicers to be preset based on defined criteria

Yes please! I have a report that gets updated weekly, with weekly release data imported from Jira. The end users like to start viewing the dashboard with only the most current release data visible, but they want to be able to then adjust the sliders to compare to previous data. So the longest step in my publishing process each week is going through all the pages of the report, nudging up the bottom node on all the sliders so they only show the ones with the highest release number.

David Wilson's profile image Profile Picture

6bfcc935 8699-4ccb-b8e9-9f8adb5f012e on 05 Jul 2020 23:35:40

RE: Allow Slicers to be preset based on defined criteria

David, realize this is just one example, but here's how we solve the date issue. Our models have date dimensions with calculated fields of YearsAgo, MonthsAgo and DaysAgo, where for example DaysAgo=0 is today, 1 is yesterday, etc. The default slicer in your example would simply be WeeksAgo=0.

David Wilson's profile image Profile Picture

31ada622 128a-4755-b9aa-e11d0b35897a on 05 Jul 2020 23:26:22

RE: Allow Slicers to be preset based on defined criteria

I'd even settle for being able to use a measure in a slicer.