CURRENT_PERIOD_INDEX
Current period index returns the value of the period that is selected.
Example
Consider the scenario where you want to calculate the Balance due for a loan taken for $40000.
Periods | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Loan amount | 40000 | 35000 | 30000 | 25000 | 21000 | 17000 | 14000 | 11000 | 8000 | 5000 | 3000 | 1000 |
Amount paid | 5000 | 5000 | 5000 | 4000 | 4000 | 3000 | 3000 | 3000 | 3000 | 2000 | 2000 | 1000 |
To achieve this the following formula should be written in the [Balance due] node:
[Loan amount]
-
[Amount paid]
.
GET
(
CURRENT_PERIOD_INDEX
)
Balance due | 35000 | 30000 | 25000 | 21000 | 17000 | 14000 | 11000 | 8000 | 5000 | 3000 | 1000 | 0 |
Explanation
As we used the current period index for Amount paid it will take Feb's value to subtract with Feb's loan amount, Mar's value to subtract with Mar's loan amount and so on.
Last updated