Picks the first argument that is not NULL. In T-SQL loads this is often used to replace a missing lookup result with an Unknown member key such as -1.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains COALESCE in context, with comparison tables and the common traps.
Terms in this definition
- FIRST
A DAX function available only inside visual calculations. It fetches the value at the start of one axis of the visual's matrix, which makes it handy for comparing each point with the first; its opposite is LAST.
- NULL
Marks that a row has nothing in a particular column, as when a person has no middle name. Columns defined NOT NULL can never be left empty.
- T-SQL
The dialect of SQL that Microsoft uses for Azure SQL and SQL Server. Azure Monitor logs are queried with KQL instead.
- LOOKUP
Inside a visual calculation, this DAX function retrieves a value from the visual matrix using whatever filters you supply, and works out any you omit from the context it is evaluated in.
- Unknown member
A placeholder row in a dimension, usually given the surrogate key -1, that a fact load points to whenever it can't find the matching dimension key. The fact row is kept rather than lost, and its key is corrected later.
- Index field attributes
Settings applied to each field in an Azure AI Search index:
searchablefor full text,retrievableto return it,filterablefor exact-match$filter,sortable,facetablefor counts, andkeyfor the unique document ID.
Related terms
- ISNULL
Swaps a NULL for a substitute value in T-SQL. COALESCE takes any number of arguments, but this takes two and returns the first one's data type, which may truncate a longer substitute.
- Partitioning hints
The SQL hints
COALESCE,REPARTITION,REPARTITION_BY_RANGEandREBALANCE, which steer how many output partitions (and hence files) are produced and how evenly; with AQE turned off,REBALANCEhas no effect.