Replace missing value with average per group

Hello,
How to deal with this missing values.
Column Rat-Row 8. i would like > average
MISSING VALUE.xlsx (10.1 KB)
Column Rat depending same Class en same Dist. O.
In this example is equal to (90+107)/2 = 98,5
For the other column it will be exactly the same idea : average same Class same Dist.O

Thanks for your help

Hi @Brain

The easiest way is to start a group loop on Dist. O and Class.

Loop start:

Put a Missing Value node in the loop and include the desired columns. Use Mean value as replacement.

Hope this helps!

3 Likes

Thanks a lot for your answer, it is exactly what i want to do but i want to take in account the CLASS and distance column.
For example
C1 dist. O 2000 Class 1 = mean C1/ Dist. O and Class 1

This is exactly what’s happening :wink: The group loop ensures that. It will consider all rows for the combination Dist. O and Class 1 and then calculate the mean for those rows only.

2 Likes

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