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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
razieh12
Frequent Visitor

ALL function is not working in drill down

Hello , 

I want to visulaize data in matrix.

the rows of matrix are respectely: Provice, City.

the column is months which are 2 months

the value of the matrix is the below measure:

   CALCULATE(sum('sale'[quantity]),ALL('sale'[months]))
 
Problem: the measure works correctly in first layer which is province but when I dill down in the second layer it does not work correctely. for example for city 27 it must show 38 for two months but the value it shows is different.
 
ps: I tried isinscope as well , but the result is the same 
razieh12_0-1692144738750.png

 

1 ACCEPTED SOLUTION
Alef_Ricardo_
Resolver II
Resolver II

Another possible solution could be to use the ALLEXCEPT function instead of the ALL function. The ALLEXCEPT function removes all filters from a table except for filters on specified columns. You can try using this function to remove all filters from your sale table except for filters on the Province and City columns.

Here’s an example of how you could use the ALLEXCEPT function in your measure:

CALCULATE(
SUM('sale'[quantity]),
ALLEXCEPT('sale', 'sale'[Province], 'sale'[City])
)

I hope this helps! Let me know if you have any further questions. 😊

View solution in original post

2 REPLIES 2
Alef_Ricardo_
Resolver II
Resolver II

Another possible solution could be to use the ALLEXCEPT function instead of the ALL function. The ALLEXCEPT function removes all filters from a table except for filters on specified columns. You can try using this function to remove all filters from your sale table except for filters on the Province and City columns.

Here’s an example of how you could use the ALLEXCEPT function in your measure:

CALCULATE(
SUM('sale'[quantity]),
ALLEXCEPT('sale', 'sale'[Province], 'sale'[City])
)

I hope this helps! Let me know if you have any further questions. 😊

Alef_Ricardo_
Resolver II
Resolver II

Hi razieh12,

It seems that you are trying to use the ALL function to remove the filter context from the months column in your sale table. However, when you drill down to the second level of your matrix, the ALL function is not working as expected.

One possible reason for this issue could be that there are other filters or slicers affecting the data in your matrix. You may want to check if there are any other filters or slicers applied to your data that could be affecting the results of your measure.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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