Forum Discussion

Michieldo's avatar
Michieldo
Helper III
6 years ago
Solved

Exclude applied filters with ALL()

Hi,   I have a certain page filter on, let's say TableX[Column2 = "" ].    Now I make the measure: CALCULATE(COUNT(TableX[Column1]), ALL(TableX[Column2)). I hoped this measure would ignore the pa...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Michieldo 

    Is there only Column2 in your Filters on this page? I think other columns in this table or other related table may impact the result.

    I build a sample table to have a test.

    Table1:

     

    Measure1 = CALCULATE(COUNT('Table1'[User]), ALL('Table1'[Quantity]))

     

    The result without filter:

    Add Quantity into Filters ,show items when the Quantity value is less than or equal to 100.

     

    Unless adding Quantity column, add User column in to filter as well.

    Change the measure:

     

    Measure2 = CALCULATE(COUNT('Table1'[User]), ALL('Table1'[Quantity],Table1[User]))

     

    All() funtion will remove the specified column's filters, so we need to add all columns in filters into All() functions. And the All(Table) is the a way to remove all filters in this table and return to a complete table. Or the result will be impacted by the filter. And if you add other related table's columns into the filter, they will impact the result of the measure as well.

    More info about ALL(): ALL

    ALL Function in Power BI – How To Use It With DAX 

     

    Best Regards,

    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.