Forum Discussion

Max_B's avatar
Max_B
New Member
1 year ago
Solved

Removing Filter Context with All

Hi everyone, 
I looked in a few forums and posts but could not find the answer. I am looking to remove the slicer context on a visual with two slicers. This used to be easily possible with All, however I cannot get it to work. I have a very simple dataset with 2 relevant columns (Name, industry). I want to remove the affect of the industry slicer and only show the selected name.

The code I use is:

Var Company5 = CALCULATE(
        max('Score Sheet'[What is the name of your company?])
        ,All('Score Sheet'[In which industry does your company operate?])
        )

return Company5


This does not remove the industry filter however, as is still applies (see picture). I tried the same with removefilters. 

Thanks for your support

 

 

  • Hi Max_B,

     

    You are correctly removing the Industry filter using ALL('Score Sheet'[Industry]), but the reason your visual shows blank is that your data context depends on both Name and Industry together. When you remove only the Industry filter, it can create ambiguity if multiple records exist for the same Name across different Industries, leading to a blank result. To properly achieve your goal, making the measure agnostic to Industry but still responding to Name -- it is better to use REMOVEFILTERS instead of ALL.

    If my response was helpful, consider clicking "Accept as Solution" and give us "Kudos" so that other community members can find it easily. Let me know if you need any more assistance!

     

    Thank you.

7 Replies

  • you removed all filters on a single column, keeping filters on other columns intact.

     

    ALL(Table[Column])

    ALL(Table)

    ALL()

     

    have different scope.

  • Max_B's avatar
    Max_B
    New Member

    Is not that correct - The measure should be agnostic to the industry part and specific to the name. So if I remove one filter through ALL(Table[Industy]) it should be showing what the name filters and not be empty right?

    • v-sgandrathi's avatar
      v-sgandrathi
      Community Support

      Hi Max_B,

       

      You are correctly removing the Industry filter using ALL('Score Sheet'[Industry]), but the reason your visual shows blank is that your data context depends on both Name and Industry together. When you remove only the Industry filter, it can create ambiguity if multiple records exist for the same Name across different Industries, leading to a blank result. To properly achieve your goal, making the measure agnostic to Industry but still responding to Name -- it is better to use REMOVEFILTERS instead of ALL.

      If my response was helpful, consider clicking "Accept as Solution" and give us "Kudos" so that other community members can find it easily. Let me know if you need any more assistance!

       

      Thank you.

      • v-sgandrathi's avatar
        v-sgandrathi
        Community Support

        Hi Max_B,

         

        I wanted to follow up on our previous suggestions regarding the issue. We would love to hear back from you to ensure we can assist you further.

        If our response has addressed your query, please accept it as a solution and give a ‘Kudos’ so other members can easily find it. Please let us know if there’s anything else we can do to help.

         

        Thank you.

  • Why just not stop interaction form this slicer In which industry does your company operate? to the card?