1 Reply Latest reply on Nov 11, 2013 2:15 PM by Dan Huff

    Conditional Table Calculation

    Hock Gan

      I have a database of students with their grades by year level. I use a table calculation to calculate the change in grade from one level to the next. How do I suppress the calculation in instances where the grades are not available? For example, student A first enrolled in Year 7 so there should not be any difference for that year. In this instance I would like to grade difference to appear as a blank rather than a zero as I need to re-export the results of the back to original database. The highlighted fields are incorrect and should be blank.





        • 1. Re: Conditional Table Calculation
          Dan Huff

          Try out the following calculation Hock:


          IF ISNULL(SUM(Score)) THEN NULL

          ELSEIF LOOKUP(ZN(SUM(Score)),-1)=0 THEN NULL

          ELSE ZN(SUM([Score])) - LOOKUP(ZN(SUM([Score])), -1) END


          The first line removes the numbers where there existed a score the year before but not one in the current year.


          The second line removes the first year from showing up.


          I hope this helps,