DAX ALL function
Returns all the rows of a table, or all the values of columns, ignoring filters.
ALL removes filters. Inside CALCULATE, it clears the filters on a table or on some columns, which is how you get a grand total next to each row.
Syntax
ALL([<table> | <column>[, <column>[, …]]])| Argument | Required | Description |
|---|---|---|
| table or column | Optional | The table, or one or more columns of the same table, to clear filters from. With no argument (inside CALCULATE), every filter in the model is removed. |
Returns: A table (when used as a table function) or nothing (as a CALCULATE modifier).
Examples
Calculated on the free practice data (table financials), with [Total Sales] = SUM(financials[Sales]) and [Total Profit] = SUM(financials[Profit]).
1. All-countries total on every row
All Countries = CALCULATE([Total Sales], ALL(financials[Country]))| Country | All Countries |
|---|---|
| Canada | 118,726,350.26 |
| France | 118,726,350.26 |
| Germany | 118,726,350.26 |
| Mexico | 118,726,350.26 |
| United States of America | 118,726,350.26 |
| Total | 118,726,350.26 |
Each row shows the total of all countries: the country filter is removed.
Good to know
- As a CALCULATE modifier, REMOVEFILTERS does the same and reads more clearly.
- ALLSELECTED keeps the user's slicer choices; ALL ignores them too.
Related functions
Official reference: ALL function on Microsoft Learn