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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
UsePowerBI
Post Prodigy
Post Prodigy

Can you clarify why ALL or ALLEXCEPT is necessary in FILTER?

Hello

 

Can you clarify why ALL or ALLEXCEPT is necessary in FILTER?

 

I see it being used in almost all FILTER statements and I wonder why.

 

Also, what is their difference in simple terms? The MSDN does not elaborate well.

 

Thanks!

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@UsePowerBI 

ALL removes the filters from the table or column specified within. So for example, if you need to calculate the precentage of values in a filter context (a table ot any visual) you will need the total for the denominator in the division. You would then use ALL to calculate the total. It is a very common function 

ALLEXCEPT removes the filters from the table specified except for the column(s) specified within. Typically this is used to calculate the totals of a subset of values. For example, if you have a visual with category and product as the filter context, you would use ALLEXCEPT to obtain the total by category for every row to obtain the percentage of say sales of each product over each  category.

Make sense?

 

PS. The following article most probably offers a more comprehensible explanatio:

Using ALLEXCEPT vs ALL and VALUES 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
PaulDBrown
Community Champion
Community Champion

@UsePowerBI 

ALL removes the filters from the table or column specified within. So for example, if you need to calculate the precentage of values in a filter context (a table ot any visual) you will need the total for the denominator in the division. You would then use ALL to calculate the total. It is a very common function 

ALLEXCEPT removes the filters from the table specified except for the column(s) specified within. Typically this is used to calculate the totals of a subset of values. For example, if you have a visual with category and product as the filter context, you would use ALLEXCEPT to obtain the total by category for every row to obtain the percentage of say sales of each product over each  category.

Make sense?

 

PS. The following article most probably offers a more comprehensible explanatio:

Using ALLEXCEPT vs ALL and VALUES 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@PaulDBrown  thanks, it makes sense to use it in a Measure which can be filtered with the filters of the Visual/Table, but what about the use of CALCULATE in a Calculated Column? There is no filtering there, right?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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