Forum Discussion
UNDERSTANDING CALCULATE FUNCTION
- 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
Anonymous , Please refer to this for the difference between calculate with and without filter expression
http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/
amitchandak i understand that having FILTER() inside calculate will get the table of only specified data ..However in my measures i havent used FILTER() ....I want to know why the fruit name is reflecting in one measure and not in another one?