dominantcolumn — Return the name of the column having the highest value.


dominantcolumn(regex, group, period, relative)

The DOMINANTCOLUMN function has the following arguments:


A regular expression that will select matching column names.


(Optional) The number of the capture group that will be used to extract the name.


(Optional) A number indicating the period in which to evaluate the function.


(Optional) A boolean value specifying if the period adjustment is relative (true) or absolute (false).


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

The following example finds the name of the column having the largest value from the set of columns that start with 'feature.Yield.', and return the last portion of the matching label:


The second parameter specifies the capture group that will contain the label. A value of 0 specifies the entire column name, otherwise the normal rules for group position apply. The default value is 0.

The third parameter specifies the offset to be used to calculate the planning period of interest. By default the dominant value will be calculated based on attributes in the current period for the expression. The offset value will be added to the current period number to determine the period to sample from. The default value is 0.

The fourth parameter modifies the calculation of the sampling period value. A value of true (the default) means that the offset parameter is added to the current period value for a relative adjustment. A value of false means that the offset value specifies the period to sample (an absolute adjustment).

If the computed period is out of range (less than 0 or greater then the number of periods) then an empty string will be returned.





dominantColumn('feature\\.Yield\\.(.*)')Return the last portion of the column name for the column starting with feature.yield that has the greatest value. 
dominantColumn('feature\\.Seral\\.(Mature|Old)\\.D', 1, 0 true)Return 'Mature' or 'Old' from the highest valued column ending with 'D' in the current period.