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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
angieleman
Frequent Visitor

Combining REMOVEFILTERS and FILTER

I have two tables that are bidirectionally related. A 1-* B

I have one page with a bunch of visualizations, and page level filters from Table B.

 

I need a measure that shows data from Table A, where there are no matching rows in Table B. The problem is that by using the page level filters from Table B, nothing shows up.

 

How can I remove the filters for Table B, and yet add a new set of filters from Table A?

 

I can successfully REMOVEFILTERS from Table B, and I can FILTER for my conditions in Table A, but I can't figure out how to combine them. I don't even need to hard code the filters for Table_A, I just need to be able to use the visualization filters in the report.

 

Measure1 = CALCULATE(SUM(Table_A[Points]),REMOVEFILTERS('Table_B'))  - this works, but I can't then use visualization filters.

 

1 ACCEPTED SOLUTION

Thanks, but that didn't work either. I liked the suggestion because I had been trying ALL and ALLSELECTED only on Table A.

I think I figured it out though - the following seems to work. I had to choose the specific columns to remove, instead of the entire table.

Measure1 = CALCULATE(SUM(Table_A[Points]),REMOVEFILTERS('Table_B'[Column_1],'Table_B'[Column_2]))

View solution in original post

3 REPLIES 3
angieleman
Frequent Visitor

Thanks, but that didn't work either. I liked the suggestion because I had been trying ALL and ALLSELECTED only on Table A.

I think I figured it out though - the following seems to work. I had to choose the specific columns to remove, instead of the entire table.

Measure1 = CALCULATE(SUM(Table_A[Points]),REMOVEFILTERS('Table_B'[Column_1],'Table_B'[Column_2]))

sevenhills
Super User
Super User

Can you try this and see if it meets your needs?

 

CALCULATE(SUM(Table_A[Points]), ALL('Table_B'))

or

CALCULATE(SUM(Table_A[Points]), ALLSELECTED('Table_B'))



Thanks, but that didn't work either. I liked the suggestion because I had been trying ALL and ALLSELECTED only on Table A.

I think I figured it out though - the following seems to work. I had to choose the specific columns to remove, instead of the entire table.

Measure1 = CALCULATE(SUM(Table_A[Points]),REMOVEFILTERS('Table_B'[Column_1],'Table_B'[Column_2]))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.