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