Discussion board where members can get started with Qlik Sense.
I have this data:
Load * Inline
I wish to use this data to generate this table using the load script.
It is important that I generate a table showing these yearly figures. Is this possible?
Go to Solution.
Try like this
*,IterNo() - 1 AS YearNumber,
If(IterNo() = 1, StartAmount, Rangesum(StartAmount, StartAmount * Discount * (IterNo() - 1), (Peek('YearlyTotal') - StartAmount) * Discount)) AS YearlyTotal
WHILE IterNo() <= LifeOfLoan;
Thanks Jagan, that was fast! I had to add LifeOfLoan+1 to the While in order to generate all the loan years, but your answer was otherwise spot on.