Short answer: BLANK is DAX's empty value, the equivalent of SQL's NULL. It follows its own rules: BLANK + 5 is 5, but BLANK * 5 is BLANK; 5 / BLANK is infinity; BLANK = 0 and BLANK = "" are both TRUE. Visuals hide rows where every measure is BLANK, which is usually what you want. Test with ISBLANK, replace with COALESCE, divide with DIVIDE, and do not turn every blank into 0: it fills visuals with empty rows and slows them down.
A measure that returns 0 instead of BLANK for products that never sold makes a table of 40 products show 4,000 rows, one per product and customer, most of them zero. Knowing when DAX produces BLANK, and when to keep it, decides both the numbers and the speed of a report.
How does BLANK behave in arithmetic and logic?
| Expression | DAX | Excel |
|---|---|---|
| BLANK + BLANK | BLANK | 0 |
| BLANK + 5 | 5 | 5 |
| BLANK * 5 | BLANK | 0 |
| 5 / BLANK | Infinity | Error |
| 0 / BLANK | NaN | Error |
| BLANK / BLANK | BLANK | Error |
| FALSE OR BLANK | FALSE | FALSE |
| FALSE AND BLANK | FALSE | FALSE |
| TRUE OR BLANK | TRUE | TRUE |
| TRUE AND BLANK | FALSE | TRUE |
| BLANK OR BLANK | BLANK | Error |
| BLANK AND BLANK | BLANK | Error |
In comparisons, BLANK is converted to 0, "" or FALSE, depending on the other value. So BLANK() = 0 is TRUE. To tell blank from zero, use ISBLANK or the strict operator ==: BLANK() == 0 is FALSE.
Where do blanks come from?
- A measure over no rows:
SUM ( Sales[Amount] )for a product with no sales returns BLANK, not 0. - Empty source values: nulls from the source become BLANK.
- Missing relationship matches: a sales row whose product key is not in the Product table goes to a blank row on the one side.
- Functions that find nothing:
SELECTEDVALUEwith several values and no alternate result,LOOKUPVALUEwith no match,DIVIDEby zero.
How do you test and replace blanks?
-- test
Has Sales = NOT ISBLANK ( [Revenue] )
-- replace, only where a 0 means something
Revenue or Zero = COALESCE ( [Revenue], 0 )
-- divide safely: BLANK (or an alternate) when the denominator is 0 or BLANK
Margin % = DIVIDE ( [Margin], [Revenue] )
-- compare to last year only when last year exists
Revenue vs LY =
VAR LY = [Revenue LY]
RETURN IF ( NOT ISBLANK ( LY ), [Revenue] - LY )COALESCE returns the first argument that is not BLANK; it takes two or more arguments.
Why not turn every blank into zero?
Microsoft's guidance "Avoid converting BLANKs to values" explains it: visuals drop rows where all measures are BLANK. A measure like [Revenue] + 0 or IF ( ISBLANK ( [Revenue] ), 0, [Revenue] ) returns a value for every combination of the visual's fields, so a table of products by customers lists every pair, most with 0. The result is long, slow and hard to read.
-- keeps blank rows out of visuals
Revenue = SUM ( Sales[Amount] )
-- turns every product-customer pair into a row
Revenue Zero = SUM ( Sales[Amount] ) + 0Use zeros only where the reader needs to see "nothing sold" for a known list (for example on a card, or months in a line chart where a gap would mislead), and keep the zero-version for that visual only.
How do you show the blank row?
When the many side has keys not found on the one side, visuals show a (Blank) item: sales without a known product. Count them:
Sales Without Product =
CALCULATE ( COUNTROWS ( Sales ), ISBLANK ( RELATED ( 'Product'[Product Key] ) ) )A simpler check: filter a visual on 'Product'[Product] is blank. Fix the keys in the source rather than hiding the row.
What goes wrong?
= 0tests.IF ( [Revenue] = 0, ... )is also TRUE for BLANK; useISBLANKor==when the difference matters.- Averages over zeros. Turning blanks into zeros lowers averages;
AVERAGEskips blanks. - Division with
/.[A] / [B]gives infinity or an error; useDIVIDE. - Blank text.
""and BLANK look alike in a visual;ISBLANK ( "" )is FALSE.
Where can you check this?
- Microsoft Learn: Data types in Power BI Desktop (blanks, empty strings and zero values)
- Microsoft Learn: Avoid converting BLANKs to values
- Microsoft Learn: COALESCE function (DAX)
Where do you start?
Search your measures for + 0 and IF ( ISBLANK ( ... ), 0 and remove the ones that only fill visuals with zeros. DIVIDE in DAX covers safe division.