Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lawadaa
Helper I
Helper I

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])

lawadaa_1-1683465364137.png

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 2
tamerj1
Super User
Super User

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] ) )
)
)

eliasayyy
Memorable Member
Memorable Member

If category = "zeed,

Calculate(sum(your column),allexcept(table,category column)),

Sum(measure)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.