3. Display filters applied to data
To understand properly our data, the very first thing we need to do is to perfectly know the filters applied to data. There are many ways to filter data (in the data source, in Power Query, in report/page/visual filters, slicers, …). So if you don’t understand your filters, you don’t understand your data. I will show you here how I display dynamically the filters applied to data.
How to display filters applied to data
- Create a measure in the table which is meant to be filtered
Selected filters =
VAR CR_LF = "
" // This is a simple carriage return
VAR Company = IF(ISFILTERED(Customers[CompanyName]) ;
"Company = " & CONCATENATEX(ALLSELECTED(Customers[CompanyName]) ; Customers[CompanyName] ; " , ") & CR_LF ; "")
VAR Category = IF(ISFILTERED(Categories[CategoryName]) ;
"Category = " & CONCATENATEX(ALLSELECTED(Categories[CategoryName]) ; Categories[CategoryName] ; " , ") & CR_LF ; "")
VAR Product = IF(ISFILTERED(Products[ProductName]) ;
"Product = " & CONCATENATEX(ALLSELECTED(Products[ProductName]) ; Products[ProductName] ; " , ") & CR_LF ; "")
RETURN Company & Category & Product
- Add a table visual to your ‘Filters’ page
- Add the ‘Selected filters’ measure to the table
Don’t forget to update your ‘Selected filters’ measure and your ‘Clear filters’ bookmark when you add more slicers to the ‘Filters’ page.
Select some filters and see how the ‘Selected filters’ responds.
Here is the pbix file of the demo : download demo ‘Report filters.pbix’
This post is a part of a series : see the series – see next post
5. Add your filtered date range in the tooltip
Don’t forget to add your filtered date range in the tooltip. This is one of…
4. Add a tooltip to display applied filters
Once you know your report is filtered having a look at the green light, you…
2. Display a light when data is filtered
When we use a report, it’s important to know if users applied filters. So, you…
1. Add a filter page to your report
There are different ways to filter data in Power BI reports. My favorite one is…