# 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.

<table><thead><tr><th width="114">Periods</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:purple;">Loan amount</mark></td><td>40000</td><td>35000</td><td>30000</td><td>25000</td><td>21000</td><td>17000</td><td>14000</td><td>11000</td><td>8000</td><td>5000</td><td>3000</td><td>1000</td></tr><tr><td><mark style="color:orange;">Amount paid</mark></td><td>5000</td><td>5000</td><td>5000</td><td>4000</td><td>4000</td><td>3000</td><td>3000</td><td>3000</td><td>3000</td><td>2000</td><td>2000</td><td>1000</td></tr></tbody></table>

To achieve this the following formula should be written in the \[Balance due] node:

<mark style="color:purple;">**`[Loan amount]`**</mark>**`-`**<mark style="color:orange;">**`[Amount paid]`**</mark>**`.`**<mark style="color:blue;">**`GET`**</mark>**`(`**<mark style="color:blue;">**`CURRENT_PERIOD_INDEX`**</mark>**`)`**

<table data-header-hidden><thead><tr><th width="158">Column1</th><th width="154">Column2</th><th width="148">Column3</th><th width="149">Column4</th><th>Column5</th><th>Column6</th><th>Column7</th><th>Column8</th><th>Column9</th><th>Column10</th><th>Column11</th><th>Column12</th><th>Column13</th></tr></thead><tbody><tr><td>Balance due</td><td>35000</td><td>30000</td><td>25000</td><td>21000</td><td>17000</td><td>14000</td><td>11000</td><td>8000</td><td>5000</td><td>3000</td><td>1000</td><td>0</td></tr></tbody></table>

### 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.
