<!-- https://learnsql.cpetoday.com/functions/dax/allnoblankrow -->
# ALLNOBLANKROW

Language: DAX
Category: Filter and context
Syntax: ALLNOBLANKROW(<table>)
Summary: Returns all the rows of a table except the blank row that a broken relationship can add.
Returns: A table. Inside CALCULATE, it removes the filters on the table but keeps out the blank row.
Level: Advanced
Related: ALL, VALUES, DISTINCT, CALCULATE, REMOVEFILTERS, RELATED

## What it does
When a fact table holds a key that matches no row in a dimension (a sale with a customer key missing from the Customer table), the model can show an extra blank row on the dimension side, so totals still add up. ALLNOBLANKROW returns the dimension without that extra row. Use it when you want to count real members only.

## Syntax and arguments
- **table**: the dimension table. Its real rows are returned, without the blank row added for unmatched keys.
- Use it inside `COUNTROWS` or `CALCULATE`. A clean model may never produce the blank row, so the function changes nothing there.

## Example
A finance team counts the customers on file, leaving out the placeholder row for unmatched sales.

```dax
Customers On File =
COUNTROWS ( ALLNOBLANKROW ( Customer ) )
```

Each real customer counts once. If some sales point to a customer key that does not exist in the Customer table, that unknown customer does not add to the count. The figure matches the customer master, which is what a reconciliation needs.

## Things to watch
- The blank row exists only when keys do not match. Check the model for it before you rely on the function.
- A blank row is a data issue. A sale for a store that is not on the store list should be fixed in the source or the dimension, not hidden.
- `ALL` can include the blank row. `ALLNOBLANKROW` does not.
- It is not the same as a blank value in a text column. A `BLANK()` in a name column is a value, not this row.
- Use it inside a calculation. On its own in a measure it returns a table, not a number.

## In business terms
Reconciliation is the main use. A count of customers or vendors on file must match the master file, and sales or bills that point to unknown records are a control issue. The blank row makes those gaps visible, and this function lets you count clean members while the gap is still reported elsewhere.
