DAX function
COALESCE — DAX function reference
First non-blank value.
Syntax
dax
COALESCE(<value1>, <value2> [, …])
Examples
dax
COALESCE([Sales], 0)
→ A value
dax
COALESCE([Actual Sales], [Forecast Sales], 0)
→ Actual if available, else forecast, else zero
dax
COALESCE(Customer[PreferredName], Customer[FirstName], "Unknown")
→ First non-blank name field
Common mistakes & gotchas
- Cleaner than IF(ISBLANK([Sales]), 0, [Sales]).
- COALESCE returns the first argument that isn’t BLANK() and accepts any number of arguments — unlike an IF/ISBLANK chain, it short-circuits, so put the cheapest or most-likely-populated expression first for performance.
- It only treats DAX BLANK() as empty — an empty string "" or a literal zero is not blank and is returned as-is, so it won’t substitute for a zero the way SQL’s COALESCE substitutes for NULL unless the source value is truly blank.
Related DAX functions
From Logical & error handling