Date Slicer Mutant Behavior

Lorenzo Vercellati
Data Pied Piper
Published in
3 min readOct 20, 2020

One of the most used visuals in Power BI reports is certainly the slicer: a simple and intuitive visual that allows users to have a lot of flexibility and a lot of information on the same page.
Over time, many important features have been added to the slicer, including different types of rendering, especially with regard to slicers on dates.
Recently working on a project for a client, I discovered that a date slicer has different default behaviors based on the type of slicer you choose.
Let’s assume we have a report with a really simple model with a fact table called Sales and two dimension tables, Product and Date. We build a card with the total sales and two slicers, one on Product and one on Date.

A really common situation

A filter on the total sales has been added to the two slicers so that they are filtered reciprocally based on the selections made on each of the two.
If I select a product I want to be able to select only the dates in the period in which I sold that product and vice versa.

As long as the two slicers are lists or dropdown lists the behavior is exactly as expected.

An expected behavior

But if we change the type of date slicer choosing the type Between, a type that users like so much, the slicer seems to no longer work correctly.

The date slicer always remains the same, showing all the dates present in the date column of the date table.
Why this unexpected behavior?
If we look at the filters that are affecting the date slicer, we can see that they are different based on the type of slicer: when it is of the Between type, the filter on the product does not affect as it does when the date slicer is of List type.

Same slicer, different filters

To understand the reason for this different behavior, we need to analyze the interactions between the two slicers.
By clicking on the edit interactions button, we can see that the product slicer acts on the date slicer as a filter when the latter is in list type, while there is no interaction in between type.

Different default interactions for different type

It will therefore be sufficient to change the interaction between the product slicer and the date one as between type by setting it as a filter and our slicers will return to work as desired.

I don’t know if this default interaction difference is related to the fact that in between type, you can force any date through calendars, while with a list you are forced to work with a defined set of elements.
It is however essential to always keep an eye on the interaction system between the visuals, especially between the slicers.

--

--

Lorenzo Vercellati
Data Pied Piper

PowerBI Solutions Architect, SQLSat DIAD PPWT Speaker, Medieval History Graduated, Football Addicted, HomeBrewer, Springsteen & Pearl Jam Fan