Forum Discussion
Long Term Solution: Ignoring Page-Level Filters with ISFILTERED
Hi Sarah_Maes ,
You mentioned that page-level filters affect the column you are using, which would cause this to return true even if no slicers are applied. To resolve this issue, consider using this function ALLSELECTED. It allows you to ignore page-level filters while still taking into account slicer selections.
For a more dynamic approach, consider creating a measure leveraging the function to check the slicer selection and count it accordingly. This approach requires a measure for each slicer but avoids the need for static references or duplicate columns.
EmployeeFilterCount = IF(ISBLANK(SELECTEDVALUE(tableX[Employee])), 0, 1)
EmployerFilterCount = IF(ISBLANK(SELECTEDVALUE(tableX[Employer])), 0, 1)
TotalFiltersApplied = EmployeeFilterCount + EmployerFilterCount
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
When I follow your approach, my issue with counting active filters is partly resolved. When I select only one employer, the count of active filters correctly shows as 1. However, when I select two or more employers, the count shows as zero. I want the result to also show '1' to indicate that a filter is applied to tableX[Employer], regardless of how many employers are selected.
Furthermore, my second problem still remains. When I select 1 employee, the count of active filters will be 2 because tableX[Employee] and tableX[Employer] are from the same table, and an employee can have only one employer. I expect to see a count of 1 when filtering by employee.
Thank you for your time!