cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in ALL function: Applying the wrong filters on other columns when removing filter on one column!

I have here a sample table:

OrderBrandColorQuantity
1DellBlue12
1HPBlack3
1HPRed4
1AppleBlack5
2DellBlack2
2DellBlue4
2HPBlack5
2HPBlue7
2HPRed1
3AppleBlack2
3DellBlack7
3DellBlue9
3HPBlack1

I've created a measure as follows:

 

 

SumQuantity = CALCULATE( SUM(Data[Quantity]), ALL(Data[Color]) )

 

 

I've created two slicers for Brand and Order and a visual table with these columns: Brand, Color, SumQuantity. With this table, I expect to see the same SumQuantity of different colors products with the same Brand in all circumstances. But when I choose Brand Dell & HP and Order 1 & 2 on the slicers, the result is shown as follows:

xwhitelight_1-1634802076717.png

Notice the SumQuantity of HP-Blue products is 13 while HP-Black/HP-Red is 20; the SumQuantity of Dell-Black is 6 while Dell-Blue is 18. 

When I filters Brand HP and Order 1 & 2 in Excel, the sum quantity is 20 so the SumQuantity of HP-Black/HP-Red rows are as expected while HP-Blue is not. I've tried to replicate the result of HP-Blue and found out Power BI is working like so:

- Applying all filters and contexts (Brand HP and Color Blue)

- With that, it finds that only Order 2 has HP-Blue products. Then it removes filter on column Color with filters Order 2 and Brand HP applied, and calculates the result SumQuantity is 13.

 

When I use the same measure replaced ALL funtion with ALLSELECTED, the result is as expected:

 

 

SumQuantity_AllSelected = CALCULATE(SUM(Data[Quantity]), ALLSELECTED(Data[Color]))

 

 

xwhitelight_2-1634802328381.png

So I guess the behavior of the ALL function is not intended.

I hope Power BI team can confirm if it's a bug and fix it if it is. Thank you.

Status: Accepted
Comments
v-robertq-msft
Community Support

Hi,

I have reported this issue internally, ICM: 268199462

 

I will update here once I get any information.

 

Best Regards,

Community Support Team _Robert Qin

v-robertq-msft
Community Support
Status changed to: Accepted
 
v-robertq-msft
Community Support

Hi,

I’ve got this message from pg:

 

This is a known problem but we need a long time to fix this, the ETA is within 12 months.

 

Best Regards,

Community Support Team _Robert Qin

xwhitelight
Regular Visitor

@v-robertq-msft Thank you for the update.