Forum Discussion

angieleman's avatar
angieleman
Icon for Advocate I rankAdvocate I
2 years ago
Solved

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.

 

  • angieleman's avatar
    angieleman
    2 years ago

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

3 Replies

  • 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'))



    • angieleman's avatar
      angieleman
      Icon for Advocate I rankAdvocate I

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

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