I simply want to calculate the average value in each column of the Math Formula Multi Column node–but not allow zeros in the cells to reduce the average value of the column.
For example, see column 4 below. I don’t want all the zeros to take away from the value of 398.14. So if 398.14 and 402.68 are the only two non-zero values in the column I want my calculated average value to be 398.14 + 402.68 = 400.68, not some tiny number once all of the zeros in the column are added in.
There’s an approach you can use with the Rule Engine here. If you set up an expression like
$mycolumn$ > 0 => $mycolumn$
Then all values greater than zero will retain their value, and all values of zero will be converted to missing (the red question mark in KNIME). Then when you calculate the average of that column in the Math Formula, the missings are ignored.
A bit hacky, but works fine
EDIT: And now I see @iperez beat me to it with a better solution. Nice!