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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
YoungLearning
Helper III
Helper III

ALLEXCEPT and Page/Report Level Filters

I want to further understand the interaction of filters with the ALLEXCEPT DAX Function.

 

Originally:

YoungLearning_0-1723444793027.png

 

Adding Regional filters: North West and London:

YoungLearning_1-1723444851051.png


On top of the Regional filters, add Date filter to 25th of May 

YoungLearning_2-1723444887701.png

 

 

 

What is happening here, is that when the region filter is applied, the ALLEXCEPT(region) is impacted (summing up London and Northwest data) while the ALLEXCEPT(date) remains unaffected. Upon adding another filter on the date, 25th of May which corresponds to a London datapoint, will lead to the ALLEXCEPT(region) calculation to be narrowed down to just London.
My point here is, page filters do affect ALLEXCEPT function to some extend, such as cases like this, and I wanted to know if this is an expected behavior?

 

 

 

 

 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @YoungLearning -ALLEXCEPT only removes filters from columns not specified in its arguments. Therefore, when you apply additional filters (like the date), the calculation reflects the combined effect of the filters in the filter context, narrowing down the result to only those data points that satisfy both the region and date filters.

 

The reason you're seeing this behavior is due to how filter context is layered and how ALLEXCEPT interacts with that context:Layering of Filters: Filters are layered on top of one another, and ALLEXCEPT does not override existing filters on the columns it does not mention. This means that if you apply a filter on Date, ALLEXCEPT('Sales', 'Region') will still respect that filter because it's not designed to remove filters on Date. When multiple filters are applied (e.g., Region and Date), the data returned is the intersection of these filters. If ALLEXCEPT is used on Region, it will still respect the Date filter because it doesn't remove it, leading to a narrowed down result set when both filters intersect.

 

Hope the above information helps, if you can share pbix file with sample data will check it for analyse





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
rajendraongole1
Super User
Super User

Hi @YoungLearning -ALLEXCEPT only removes filters from columns not specified in its arguments. Therefore, when you apply additional filters (like the date), the calculation reflects the combined effect of the filters in the filter context, narrowing down the result to only those data points that satisfy both the region and date filters.

 

The reason you're seeing this behavior is due to how filter context is layered and how ALLEXCEPT interacts with that context:Layering of Filters: Filters are layered on top of one another, and ALLEXCEPT does not override existing filters on the columns it does not mention. This means that if you apply a filter on Date, ALLEXCEPT('Sales', 'Region') will still respect that filter because it's not designed to remove filters on Date. When multiple filters are applied (e.g., Region and Date), the data returned is the intersection of these filters. If ALLEXCEPT is used on Region, it will still respect the Date filter because it doesn't remove it, leading to a narrowed down result set when both filters intersect.

 

Hope the above information helps, if you can share pbix file with sample data will check it for analyse





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thank you for this. I guess in my use case, it would be better to have one filter enabled at a time. 

Nop, Happy to share, Yes it is .





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.