Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Evaluates a list of expressions and returns the first non-null (or non-empty for string) expression.
Syntax
coalesce(arg,arg_2,[arg_3,...])
Learn more about syntax conventions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| arg | scalar | ✔️ | The expression to be evaluated. |
Note
- All arguments must be of the same type.
- Maximum of 64 arguments is supported.
Returns
The value of the first arg whose value isn't null (or not-empty for string expressions).
Examples
print result=coalesce(tolong("not a number"), tolong("42"), 33)
Output
| result |
|---|
| 42 |