Cross Filtering Versus Slicers In Power BI

15 October, 2015 (12:58) | Power BI | By: Mark V

This post is inspired by a question on the Power BI Community site: PBI Graph Scaling. The question relates to the behavior of scaling of graphs when using Cross Filtering in a Report. It seems, as Seth Bauer (Eno1978) pointed out, that they may want to use a Slicer instead.

I figured an analysis of the behavior of cross filtering and slicers would help people learn what to expect in each situation and guide folks in choosing which feature they want to use. For this example, we will use the report shown in Figure 1 relating to student chocolate bar sales for a fundraiser.

Figure 1

image

This report features three visuals in Power BI Desktop:

1. Column chart showing Sales Amount – Total by Flavor

2. Bar Chart showing Sales Amount – Total by Size

3. Slicer allowing for filtering by Size

Cross Filtering

Cross Filtering is the feature that allows clicking on a part of a visual, like a Column in a Column chart, and filtering all other data on the Report page to highlight the values associated with that Column. Doing this allows for comparison to the full totals by leaving references to data not meeting the filter in each visual, but shown faded. For example, if we click the Large bar in the Sales Amount – Total by Size Bar chart, we will filter the visuals to highlight the values relating to Large bar sales as shown in Figure 2.

Figure 2

image

Note that the values for the Small bar sales are still visible for comparison, but are clearly lightened so that the Large sales are easily seen. We can return to the unfiltered view by clicking the Large bar again.

Slicer

Slicers actually remove the values that do not meet the filter from the visuals entirely. For example, if we click the Large option on the Size slicer, we get the view shown in Figure 3.

Figure 3

image

Notice in this view that the Small bar has been completely removed from the bar chart. With quick comparison to Figure 2, you can also see that the scale of the column chart has changed so that the top value is just over $3k, which corresponds to the columns in the cross filtered version. The portion of the sales corresponding to the Small bars is completely removed.

Incidentally, the behavior of a Slicer matches the behavior you would see if you put the Size field in the Filter area at the Report or Page level.

Conclusion

As we can see, the behavior of cross filtering is certainly different from the behavior of using a Slicer. Cross Filtering allows you to see how the filtered value(s) compares to the overall total. A Slicer filters such that only values meeting the filter are allowed to appear at all. There are occasions when one or the other might be preferred. Understanding which is which will save you time and effort while visualizing your data with Power BI.

While the example here is from Power BI Desktop, the behavior in the Power BI Service is currently the same.

Note: The behavior here is current as of October 15th, 2015. It is subject to change in the future as Microsoft continues to make the awesomeness of Power BI even better.

Comments

Comment from Terry
Time October 8, 2016 at 1:57 am

But ykou can change the cross filter function to the same as a slicer ie removes the data , use interactions button and then select funnel for each visual you want to remove rather than highlight.

Comment from Mark V
Time October 11, 2016 at 10:54 am

Thanks, Terry. The functionality has certainly changed since this post was published last year. I love how Power BI keeps getting love and moving forward to better and better experiences.

Write a comment