Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

D toc



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.

D s

D code

derive type:single value: COALESCE([col1,col2,col3]) as: 'firstValue'

Output: Generates the firsValue column, which contains the first non-missing detected in col1col2, or col3 in that order. 

D s

D code

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.

ArgumentRequired?Data TypeDescription
col_ref1YstringName of the first column to find the first non-missing value
col_ref2NstringName of the second column to find the first non-missing value
col_ref3NstringName of the third column to find the first non-missing value

D s lang notes

col_ref1, col_ref2, col_ref3

Name of the column(s) searched for the first non-missing value.

D s

Required?Data TypeExample Value
YesString (column reference)[myColumn1, myColumn2]

D s

Example - Find first time

You are tracking multiple racers across multiple heats. Racers might sit out heats for various reasons. 


Here's the race data.

Racer X 38.2237.61
Racer Y41.33 38.04
Racer Z39.2739.0438.85


Use the following transform to grab the first non-missing value from the Heat columns:

D code

derive type:single value:COALESCE([Heat1, Heat2, Heat3]) as:'firstTime'


Racer X 38.2237.6138.22
Racer Y41.33 38.0441.33
Racer Z39.2739.0438.8539.27

D s also