Rule engine returning specific value (value being the column name)

Is there a way for the rule engine to return a specific value, where the specific value is the column name?

For example, I have the following data set:

             1/1/2017	1/1/2018	1/1/2019     Results
# of apples     5            2           0       1/1/2019
# of oranges    0            1           7       1/1/2017

I want to determine if the value is = 0 in any of the columns, and if the value is equal 0, to return the name of the column as highlighted in the above example (results column).

Thanks in advance!

Hi @vivianmpoon and welcome to the KNIME Forum,

First unpivot all the columns, then filter rows where the value is 0 and finally join to the main table:

24549-1-1.knwf (27.8 KB)


1 Like

@armingrudd thanks this worked perfectly :smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.