🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

"Calculating average with missing values"

User: "iesnaola"
New Altair Community Member
Updated by Jocelyn

Hi everyone,

 

Having a Dataset like the following one:

 

row - Att1 - Att2 - Att3

(1)     5        7         5     

(2)     6        8         9     

(3)               7         6

(4)               7         

 

I want to calculate the average so that result would be the following one:

row - Att1 - Att2 - Att3 - Average

(1)     5        7         5         5.6

(2)     6        8         9         7.6

(3)               7         6         6.5

(4)               7                    7

 

I am using operator Generate Attributes, with the following function:

avg(Att1, Att2, Att3)

However, when any of the rows has a missing value, I simply get a Missing Value as Average.

 

I would like to know how to solve this problem.

 

Thanks in advance

         

Find more posts tagged with