Replacing Zeros with Avg from other rows

In the table below, I need to replace the zero by the average visibility of all DRA59 items listed.

How can I accomplish this using Knime? what node(s) could I use?
Do I need a javascript?

visibility

You could use this concept of moving average but use it to calculate the avg value without the missing or zeros. And then replace them with the avg value using a Rule Engine

2 Likes

Hi there!

Additionally what you can do is to replace all 0s with missing values using Rule Engine node with only following rule:
$visibility$ > 0 => $visibility$ and option replace column checked.

Then there is Missing Value node that you can use inside of a Loop which will replace missing values with desired function (mean in your case). Check this topic:

Br,
Ivan

1 Like

Thank you all for your ideas and replies. Greatly appreciate it.

I will test, Ivan’s workflow seems to be the simplest and easiest to implement.

I greatly appreciate ideas for my other thread:

Thanks!

1 Like

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