1 Reply Latest reply on Sep 15, 2016 11:31 PM by Steve Taylor

    Explain Pls

    Govind Ramchetty


      What is the logic for below query.Can you pls explain


      (ZN(SUM([Grand Total Expense])) - LOOKUP(ZN(SUM([Grand Total Expense])), -1)) / ABS(LOOKUP(ZN(SUM([Grand Total Expense])), -1))




      Govind R

        • 1. Re: Explain Pls
          Steve Taylor

          Hello Govind


          This looks like a % difference calculation. Your [Grand Total Expense] field is being summed (and replacing any NULLs with Zero using ZN()) then the previous row's figure (which is the LOOKUP() function specifying -1) is subtracted, and that difference is being divided by the total figure from the previous row (the ABS() returns the value as a positive number as it looks at it's absolute size not +/-).


          The LOOKUP() is a table calculation so it may be addressing the data across or down the table/pane, you need to right click and select edit table calc to see which direction it's running and the scope of the calculation.