Name

nonzerocolumn — Return the name of the first matching column having a nonzero value.

Syntax

nonzerocolumn(regex)
              

The NONZEROCOLUMN function has the following argument:

regex

A regular expression that will select matching column names.

Description

This function will scan all numeric column whose names match a specified regular expression pattern, and return the name of the first column with a non-zero value. If the regular expression includes a grouping phrase then the value of the first group will be returned.

Examples

Formula

Description

Result

nonzerocolumn('feature\\.Yield\\.(.*)')Return the last portion of the column name for the first column starting with feature.yield that has a non-zero value.