Forum Discussion

Chris1300's avatar
Chris1300
Helper II
3 years ago
Solved

Measure not working with REMOVEFILTERS function

I have a simple table shown below. I have a measure calculation shown below. 

 

Column1Column2Column3Column4
1a2a4a6
1b2b4b6
0c2c4c6
0d2d4d6
1e2e4e6
1f3f5f7
1g3g5g7
0h3h5h7
1i3i5i7
0j3j5j7

 

Measure = CALCULATECOUNT(Sheet1[Column1]) , REMOVEFILTERS(Sheet1[Column3],Sheet1[Column4]))
 

The measure counts the number of values in "Column 1" but SHOULD NOT include the column 3 and 4 filters when counting. If I filter things in column 3 and 4, while Column2 has no filter it DOES NOT change the measure. This makes sense, below is a screenshot with 3 slicer filters for columns 2,3,4 with card for measure and overall table.

 

BUT, if I select few items in column2 AND then also select items in Column 3 or 4. The measure seems to break down. It DOES NOT function like its written, where it should remove filters on column3 and 4 for that measure. Below screenshot shows I selected 5 items in column 2 AND 1 item in column3 and 4. The measure here should be 5, buts its 1. I don't understand why this is happening?

 

 

What am I doing wrong? My end goal is to get a measure that counts column 1, while Column 2 has a filter and ignores filter on columns 3 and 4.

 

  • Hi, Chris1300 

    You can try 'Edit interactactions' to change how visuals interact in a Power BI report.

    You need select slicer 'Column3',select 'Format'->'Edit interactactions' and then disable its interaction with other visual.This way the results of other visuals will not be filtered by the value of slicer 'Column3'.

    Do the same for slicer 'Column4' and  you will get the same Ideal Measure Output.

     

     

    Best Regards,
    Community Support Team _ Eason

3 Replies

  • Chris1300 , Make independent tables for these columns

    c3 = distinct(Table[C3])

     

    and then use them in filter as per need 

     

     CALCULATE( COUNT(Sheet1[Column1]) , filter(Sheet1,  Sheet1[Column3] in values(c3[Column 3] ) ) )

     

    Need of an Independent Table in Power BI - Exclude: https://youtu.be/lOEW-YUrAbE

    • Chris1300's avatar
      Chris1300
      Helper II

      No that does not work. I think I am not explaning my use case/problem clearly. Let me try again with a matrix of ideal measurement vs my measurement.

       

      Recall my measurement is: Measure = CALCULATECOUNT(Sheet1[Column1]) , REMOVEFILTERS(Sheet1[Column3],Sheet1[Column4]))

       

       # of items selected in Column 2 (slicer)# of items selected in Column 3 (slicer)# of items selected in Column 4 (slicer)My Measure OutputIdeal Measure Output
      Case 1

      None

      None

      None1010
      Case 24NoneNone44
      Case 3None421010
      Case 442114
      Case 542None24
      Case 64None224
       
      My current measure fails for case 4,5,6 and it works for case 1,2,3. I need a measurement that can output the ideal measurement column.
       
      Hope this helps explain my issue.

       

       

       

      • v-easonf-msft's avatar
        v-easonf-msft
        Community Support

        Hi, Chris1300 

        You can try 'Edit interactactions' to change how visuals interact in a Power BI report.

        You need select slicer 'Column3',select 'Format'->'Edit interactactions' and then disable its interaction with other visual.This way the results of other visuals will not be filtered by the value of slicer 'Column3'.

        Do the same for slicer 'Column4' and  you will get the same Ideal Measure Output.

         

         

        Best Regards,
        Community Support Team _ Eason