Forum Discussion

MackenziePhilli's avatar
MackenziePhilli
Qrew Trainee
3 years ago

Create an Average field

I have a table for surveys that I get results from that mimic the following:
Question 1 Question 2 Question 3 Question 4 Average
5 4 no experience 5 4.67
5 5 5 no experience 5
3 4 no experience 4 3.67
3 4 5 5 4.25

I would like to to be able to create a field that calculates the average of the results from that record. The field needs to be converted using  tonumber() because we have to have the choice "no experience". If the field is "no experience" I want to exclude it from the calculation. I've tried a numeric formula field to do this where if the field is not null or not equal to "no experience" I convert it tonumber and add:

If (not IsNull(ToNumber([PreConDesignProcess])) or [PreConDesignProcess] <> "no experience",ToNumber([PreConDesignProcess]),0)+
If (not IsNull(ToNumber([PreConEstAccuracy])) or [PreConEstAccuracy] <> "no experience",ToNumber([PreConEstAccuracy]),0)+
If (not IsNull(ToNumber([PreConProcurement])) or [PreConProcurement] <> "no experience",ToNumber([PreConProcurement]),0)+
If (not IsNull(ToNumber([PreconQualityValueEng])) or [PreconQualityValueEng] <> "no experience",ToNumber([PreconQualityValueEng]),0)

But the field is blank when I try to display it. Anyone able to help with this?




------------------------------
Mackenzie Phillips
------------------------------

1 Reply

  • Nevermind got it, changed around the way I phrased the IF statements

    ------------------------------
    Mackenzie Phillips
    ------------------------------