Forum Discussion
Anonymous
5 years agoNot applicable
UNDERSTANDING CALCULATE FUNCTION
Hi Team, I have the dataset as below Product Table Color FruitName Green apples Yellow bananas Orange oranges Sales table FruitName ...
- 5 years ago
Hi Anonymous ,
When the second argument of
CALCULATEis a boolean filter rather than a table of values, it is equivalent toFILTER(ALL(column), filter): that is:CALCULATE(sumx('Sales table','Sales table'[Quantity]*'Sales table'[SaleAmt]),FILTER(ALL('Product Table'[Color]),'Product Table'[Color]="Yellow")).AndCALCULATEdoes indeed override the filter context when evaluating its first argument; using the rows provided to its second argument as the new filter context. However;CALCULATEdoes not alter the filter context when evaluating its second argument, and so pre-existing filters remain unless they are explicitly removed.refer:https://stackoverflow.com/questions/49909388/dax-calculate-doesnt-seem-to-be-overriding-pivot-filterBest RegardsLucien
v-luwang-msft
5 years agoCommunity Support
Hi Anonymous ,
Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.
Best Regards
Lucien