Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Sarah_Maes
Frequent Visitor

Long Term Solution: Ignoring Page-Level Filters with ISFILTERED

Hi all,

Thank you for reading my question.

I’ve created a slicer panel that contains several slicers. Because this slicer panel can be expanded or minimized, when minimized I want to let users know an exact number of filters that has been applied.

Problem 1:  A page-level filter also uses this column to remove some data from the page. This results in ISFILTERED returning true regardless of whether or not the slicer for tableX[Business Line] has been applied (see screenshot).

Problem 2: Since a couple of my slicers (fluo on the picture) originate in the same table, they filter each other. For example: 1 employee has only 1 Employer. When I filter on the slicer employee, I only want to see the number one ‘1’ listed. If I filter on employer and employee I want to see the number ‘2’ listed. I managed to get around this problem in my dax, but when the employer is filtered again in as a page-level filter (ref. problem 1), it will list number ‘2’ when only an employee is filtered in the slicer.

Sarah_Maes_0-1719413971003.png

 

I am aiming for future-proof reporting:

  • I don’t want to create a duplicate column since my data model is already extensive.
  • I don’t want to with ‘COUNTROWS ( ALLSELECTED ( Table[Column] ) ) < 'X’ because my dim_table is dynamic and not static. Eg. It's possible that there is a new Business Line next year.

Is there a way to go around this problem?

Thank you a lot!
If you solve this, I give you a lifetime of good karma.

Sarah 🙂 


2 REPLIES 2
Anonymous
Not applicable

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.

Hi @Anonymous, thank you for your reply!

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.

Sarah_Maes_2-1719476014979.png

 



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.

Sarah_Maes_0-1719474089610.png

Thank you for your time!

Helpful resources

Announcements