Function returns the first non-missing value found in an array of columns.
The order of the columns listed in the function determines the order in which they are searched.
- If you need to perform analysis across multiple columns of heterogeneous data, see Analyze across Multiple Columns.
- If you need to perform analysis across multiple homogeneous columns, see Calculate Metrics across Columns.
D s snippet Basic
derive type:single value: COALESCE([col1,col2,col3]) as: 'firstValue'
Output: Generates the
firstValue column, which contains the first non-missing detected in
col2, or or
col3 in that order.
derive type:single value: COALESCE([col_ref1,col_ref2, col_ref3] )
A reference to a single column does not require brackets. References to multiple columns must be passed to the function as an array of column names.
|col_ref1||Y||string||Name of the first column to find the first non-missing value|
|col_ref2||N||string||Name of the second column to find the first non-missing value|
|col_ref3||N||string||Name of the third column to find the first non-missing value|
|D s lang notes|
col_ref1, col_ref2, col_ref3
You are tracking multiple racers across multiple heats. Racers might sit out heats for various reasons.
Here's the race data.
|D s also|