Solved

How can I set up a calculation to ignore values equal to 0 when calculating the mean?

  • 5 May 2023
  • 1 reply
  • 5 views

I have a shapefile with numerous columns that I need to calculate a mean for on a row by row basis. Within the data there are a lot of values equal to 0 that are skewing the mean - how can I set up a calculation in the ExpressionEvaluator to remove the 0's from my calculation?

icon

Best answer by dustin 5 May 2023, 15:18

View original

1 reply

Userlevel 3
Badge +26

Nulls would not be evaluated in that situation, so I would use a NullAttributeMapper prior to the ExpressionEvalutor setting all 0's to <null>. Then after your ExpressionEvaluator, use another NullAttributeMapper to set <null> back to 0's.image

Reply