# Thread: Ideas on applying interest rates on different fields?

1. Senior Member
Join Date
Feb 2011
Posts
840

## Ideas on applying interest rates on different fields?

Input would be something like...
Code:
```Field1
Field2
Field3
Field4
Field5
Field6

Account number
yearmonth1
yearmonth2
yearmonth4
yearmonth5
yearmonth6

1
123456,78
125345,6687
127263,4575
129210,5884
131187,5104

```
Fields 1, 2 and 3 are supplied, 4, 5 and 6 should be calculated (20% yearly, 1,53% monthly). Any ideas? Or is there something already implemented for this, that I'm ignorant about?

2. Senior Member
Join Date
Feb 2011
Posts
840
I'm a damn wizard. Just found out a way =D

that input I've shared was all wrong, information has already been denorm-norm (so that all months which didn't have values initially can be accounted for).

So we have 3 fields: yearmonth, accountnumber, value - and I added a "count=1" field.

Next step, separating value=null, and using Group by, make count_1 = cumulative sum of count field, grouped by yearmonth and accountnumber.

Select value to remove count and rename count_1 into count, rejoin both streams on a Sort step, by accountnumber and yearmonth.

Up comes another Group By step, with new_value = last non-null value.

Another split: if value=null, again, it goes another way.... where a Formula step will calculate (new_value)*(monthly_interest)^count.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•