ALLNOBLANKROW DAX Function (Filter)
Returns all the rows except blank row in a table, or all the values in a column, ignoring any filters that might have been applied.
The name of an existing table or column.
A column in the same base table. The column can be specified in optional parameters only when a column is used in the first argument, too.
The result can include blank values if the table has blank values. The only blank that is not included in the result is the one added to the table in case of invalid relationships.
This function removes the corresponding filters from the filter context. It does not materialize the resulting table when called directly in a filter argument of CALCULATE or CALCULATETABLE.
The only blank row that is ignored is the one added to a table in case of an invalid relationship. If the table contains blank values in columns, these values are included in the result.
» 3 related functions
The ALLNOBLANKROW function can be applied to either a table or a set of columns.
ALLNOBLANKROW ( Customer ) ALLNOBLANKROW ( Customer[Country], Customer[State] , Customer[City] )
-- -- ALLNOBLANKROW still returns blanks, if they are present among the -- regular rows of the table. The only blank ignored is the one in the -- blank row -- EVALUATE ADDCOLUMNS ( ALLNOBLANKROW ( Customer[Birth Date] ), "# Customers", CALCULATE ( COUNTROWS ( Customer ) ) ) ORDER BY [Birth Date]
-- -- If you need to remove blanks, you need to use either FILTER -- or CALCULATETABLE to manually remove blanks. -- EVALUATE ADDCOLUMNS ( FILTER ( ALLNOBLANKROW ( Customer[Birth Date] ), NOT ( Customer[Birth Date] == BLANK () ) ), "# Customers", CALCULATE ( COUNTROWS ( Customer ) ) ) ORDER BY [Birth Date]
Learn more about ALLNOBLANKROW in the following articles:
Avoiding circular dependency errors in DAX
This article explains how DAX handles dependencies between tables, columns and relationships, to help you avoid circular dependency errors. » Read more
Blank row in DAX
There are two functions in DAX that return the list of values of a column: VALUES and DISTINCT. This article describes the difference between the two, explaining the details of the blank row added to tables for invalid relationships. » Read more
Understanding Circular Dependencies in DAX
This article explains how to avoid circular dependency errors that can occur in DAX when two or more entities (calculated columns or calculated tables) reference one another in such a way that the engine cannot compute their value. » Read more
Other related functions are:
Last update: Jun 6, 2023 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/allnoblankrow-function-dax