Home » DAX » DAX – ALL function

DAX – ALL function

ALL DAX Function

As its name suggests, the ALL function retrieves all the rows in a table or all the values in a column.

The ALL function removes the applied filters from the filter context. It belongs to the Filter function category in DAX

Syntax:

ALL ({<table> or <column>, [<column>], [<column>] …})

Refer similar DAX:- ALLEXCEPTALLSELECTED



Description:

Sno. Parameter Description
1 table The table that you want to clear filters on.
2 column The column that you want to clear filters on.

Let’s begin with an example. You can download the sample dataset from the link provided below.

Power Bi DAX- ALL function Sample Data

Power BI DAX- ALL function Sample Data

So now, we will create a measure using the DAX ALL function, and within that measure, we will calculate the sum of the ‘Sales’ column.

ALL_DAX = 
CALCULATE(Sum(Orders[Sales]), ALL(Orders[Product Sub-Category]))




We placed the ‘Product Subcategory’ column within the ALL function, so in this case, no matter what filters you apply, it will always return the sum of all ‘Product Subcategory’ values, which is 19,24,337.88.

Power Bi - ALL DAX Function Example

Power BI – ALL DAX function Example

According to the output screen with the filters above, we filtered a few product subcategories, but it ignored the filters and returned the sum of total sales.

Refer similar DAX:- ALLEXCEPTALLSELECTED

Other DAX functions: DAX functions

Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome.



7 thoughts on “DAX – ALL function”

  1. Question… I want to find the MAX on a column and have the measure ignore any filters on the page. But writing this as “MAX(ALL(Table[Column]))” doesn’t see to work. Any ideas?

  2. But if you apply a region filter, the values change. So I understand that All function ignores only product subcategory filter, but it takes external filters. Am I right?

    1. Yes, you are right, but if you want to apply filter on that table, then no need to give column name just give the table name, it will clear all the filters on that table.

    2. Yes, you are right, but if you don’t want the values to be changed even after applying the external filters, then just remove the column name from dax and just give the table name, then it clears all the filters on that table.
      eg: CALCULATE(SUM(Table[Column]),ALL(Table))

Leave a Reply