Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Ideas on applying interest rates on different fields?

  1. #1
    Join Date
    Feb 2011
    Posts
    840

    Default 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?
    Join us on IRC! =)

    Twitter / Google+ / Timezone: BRT-BRST
    BI Server & PDI 5.4 / MS SQL 2012 / Learning CDE & CTools
    Windows 8 64-bit / Java 7 (jdk1.8.0_75)

    Quote Originally Posted by gutlez
    PLEASE NOTE: No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.

    I'm no expert.Take my comments at your own risk.

  2. #2
    Join Date
    Feb 2011
    Posts
    840

    Default

    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.
    Join us on IRC! =)

    Twitter / Google+ / Timezone: BRT-BRST
    BI Server & PDI 5.4 / MS SQL 2012 / Learning CDE & CTools
    Windows 8 64-bit / Java 7 (jdk1.8.0_75)

    Quote Originally Posted by gutlez
    PLEASE NOTE: No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.

    I'm no expert.Take my comments at your own risk.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.