Discussions

Expand all | Collapse all

Create an Average field

  • 1.  Create an Average field

    Posted 08-23-2021 10:51
    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
    ------------------------------


  • 2.  RE: Create an Average field

    Posted 08-23-2021 11:13
    Nevermind got it, changed around the way I phrased the IF statements

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