IGNORE
In SUMMARIZECOLUMNS, marks an expression whose blanks don't remove a row.
Group: Table manipulation. Compatible with DAX.
Syntax
IGNORE ( <expression> )
| Parameter | Type | Description |
|---|---|---|
expression | Expression | One of the expressions of SUMMARIZECOLUMNS, whose blanks should not decide which rows remain. |
Returns
Same as its expression. The expression's value, unchanged.
Remarks
SUMMARIZECOLUMNSleaves out a row when all its expressions are blank. An expression wrapped in IGNORE does not take part in that test: a row whose other expressions are all blank goes, even if the ignored one has a value.- Its typical use is a constant or a target that has a value on every row and would otherwise bring back rows with no data.
- It has a meaning only as an expression of SUMMARIZECOLUMNS.
Examples
Crates shown, but only where beer was sold
The depot has crates and no sales. With the crates ignored, its row goes; without IGNORE it would stay, with blank liters.
EVALUATE
SUMMARIZECOLUMNS (
Places[Kind],
"Crates", IGNORE ( [Deliveries] ),
"Liters", [Liters sold]
)
ORDER BY Places[Kind]
| Places[Kind] | Crates | Liters |
|---|---|---|
| Shop | 178 | 1806463 |
A target on every row
EVALUATE
SUMMARIZECOLUMNS (
Products[Product],
"Liters", [Liters sold],
"Target", IGNORE ( 500000 )
)
ORDER BY Products[Product]
| Products[Product] | Liters | Target |
|---|---|---|
| Cider | 301074 | 500000 |
| IPA | 331884 | 500000 |
| Lettøl | 169179 | 500000 |
| Pils | 1004326 | 500000 |