2 Replies Latest reply: Jan 23, 2016 9:16 AM by Stefan Wühl RSS

    Summation to the n-th period

    Tanner Glenn

      Hey all, I'm trying to calculate a formula that uses a summation and I don't know the best way to tackle this. I've played around with loops in the load script and using the aggr() function but can't seem to get it right.


      I have three variables that I already have calculated: cash flow (CF), interest rate ( i ) and number of periods (n).


      The formula mathematically looks like:

      Σ ( t * CF) / ((1 + i ) ^ t )

      from t=1 to n


      If anyone has dealt with this kind of formula before in Qlik I'd greatly appreciate some help. Thank you!