Forum Discussion

Akhil_1411's avatar
Akhil_1411
Icon for Helper IV rankHelper IV
6 years ago

AllExcept column with slicer value

Hi,

 

I am trying to create Allexcept for profit at column level. At one customer level it works fine.
But i was trying to slice down to category level by selecting one value at category the AllExcept should be calculated at category level it is not giving me the right result.  Can anyone please help in this.

 

Dax which i was trying:-

 

Profit by customer =
var A = CALCULATE(SUM(Orders[Profit]),ALLEXCEPT(Orders,Orders[Customer Name]))
var B = CALCULATE(SUM(Orders[Profit]),ALLEXCEPT(Orders,Orders[Category]))
var c = IF(ISFILTERED(Orders[Category]),B,A)
return c


Note: I need AllExcept at column is because i need to create buckets based on this results.
 
Thanks,
Akhil.