Forum Discussion
create dax measure to remove context filter
hi everyone
im trying to create a measure that remove the conext filter in a table visual with if statement condition
i was trying to use 'all' function to remove the filter from the column but still not working.
current measure : calculate(sum('categories trans'[achievement]), all('categories trans'[Base_type])
in the above example , i want to ignore the filter by (base_type) column in one category (zeed) and keep it for the other categories.
for example:
if category= 'zeed' i want the achievement measure to return 441 and for other categories i want the achievment measure to return same values above.
2 Replies
- eliasayyyMemorable Member
If category = "zeed,
Calculate(sum(your column),allexcept(table,category column)),
Sum(measure)
- tamerj1Community Champion
Hi lawadaa
please try
Achievement Measure =
SUMX (
VALUES ( 'categories trans'[categories summarize] ),
IF (
'categories trans'[categories summarize] = "Zeed",
CALCULATE (
SUM ( 'categories trans'[achievement] ),
ALL ( 'categories trans'[Base_type] )
),
CALCULATE ( SUM ( 'categories trans'[achievement] ) )
)
)