Inflation with different rates per year

what am I doing wrong here
trying to get compound inflation for 20yrs (starting at 2001) where the inflation rate increases each year.
I'm missing something basic my inflated amt is coming up null when I use
inflated_amt[iteration_number + 1 ] = inflated_amt[iteration_number] * (1 + inflation_rt[cv()])
if I change it to
inflated_amt[iteration_number + 2 ] = inflated_amt[iteration_number + 1] * (1 + inflation_rt[cv()])
I'm close but I'm missing my first year (2001)
anyway here is my query
with
inflation_table as
(select level j, level + 2000 yr, level * .01 inflation_rt
from dual
connect by level < 21),
base_amount_table as
( select level * 10 base_amt from dual connect by level < 3)
select yr, inflation_rt, base_amt, inflated_amt
from inflation_table, base_amount_table
model return updated rows
partition by (base_amt)
dimension by (j)
measures (inflation_rt, yr, base_amt inflated_amt)
rules iterate (20)
inflated_amt[iteration_number + 1 ] = inflated_amt[iteration_number] * (1 + inflation_rt[cv()])
Edited by: pollywog on Mar 25, 2010 12:51 PM

Actually, you probably need this:
with inflation_table as (
                         select  level j,
                                 level + 2000 yr,
                                 level * .01 inflation_rt
                           from  dual
                           connect by level < 21
    base_amount_table as (
                          select  level * 10 base_amt
                            from  dual
                            connect by level < 3
select  yr,
        inflation_rt,
        base_amt,
        inflated_amt
  from  inflation_table,
        base_amount_table
  model
    partition by(base_amt)
    dimension by(j)
    measures(inflation_rt,yr,base_amt inflated_amt)
    rules
     inflated_amt[1] = inflated_amt[cv()] * (1 + inflation_rt[cv()]),
     inflated_amt[j > 1] order by j = inflated_amt[cv() - 1] * (1 + inflation_rt[cv()])
        YR INFLATION_RT   BASE_AMT INFLATED_AMT
      2001          .01         20         20.2
      2002          .02         20       20.604
      2003          .03         20     21.22212
      2004          .04         20   22.0710048
      2005          .05         20    23.174555
      2006          .06         20   24.5650283
      2007          .07         20   26.2845803
      2008          .08         20   28.3873468
      2009          .09         20    30.942208
      2010           .1         20   34.0364288
      2011          .11         20   37.7804359
        YR INFLATION_RT   BASE_AMT INFLATED_AMT
      2012          .12         20   42.3140882
      2013          .13         20   47.8149197
      2014          .14         20   54.5090085
      2015          .15         20   62.6853597
      2016          .16         20   72.7150173
      2017          .17         20   85.0765702
      2018          .18         20   100.390353
      2019          .19         20    119.46452
      2020           .2         20   143.357424
      2001          .01         10         10.1
      2002          .02         10       10.302
        YR INFLATION_RT   BASE_AMT INFLATED_AMT
      2003          .03         10     10.61106
      2004          .04         10   11.0355024
      2005          .05         10   11.5872775
      2006          .06         10   12.2825142
      2007          .07         10   13.1422902
      2008          .08         10   14.1936734
      2009          .09         10    15.471104
      2010           .1         10   17.0182144
      2011          .11         10    18.890218
      2012          .12         10   21.1570441
      2013          .13         10   23.9074598
        YR INFLATION_RT   BASE_AMT INFLATED_AMT
      2014          .14         10   27.2545042
      2015          .15         10   31.3426799
      2016          .16         10   36.3575086
      2017          .17         10   42.5382851
      2018          .18         10   50.1951764
      2019          .19         10     59.73226
      2020           .2         10   71.6787119
40 rows selected.
SQL> SY.
Edited by: Solomon Yakobson on Mar 25, 2010 1:12 PM

Similar Messages

  • ALV Table: DROPDOWN-Column with different valuesets per row

    Hello,
    I tried to create a dropdown by index cell in a table with different valuesets in each row. So I created an attribute VALUESET of type WDR_CONTEXT_ATTR_VALUE_LIST in my node to provide different valuesets per element. In my ALV-table I bound the property "valueset_fieldname" of the dropdown-cell to the context-attribute VALUESET:
      lo_column = lo_alv_model>if_salv_wd_column_settings~get_column( id = 'PRICE').
      CREATE OBJECT lo_drop_down_idx
        EXPORTING
          selected_key_fieldname = u2018PRICEu2019.
      lo_drop_down_idx->set_valueset_fieldname( value = u2018VALUESETu2019 ).
      lo_column->set_cell_editor( lo_drop_down_idx ).
    Now I have the problem, that the list of the dropdown-cell displays the proper amount of values but not the proper texts . My valueset looks for example like this:
    Value: A
    Text:  A
    Value: B
    Text:  B
    Value: C
    Text:  C
    Value: D
    Text:  D
    But my Dropdown-cell shows these values:
    A
    A
    A
    D
    Could you please help?
    Edited by: Developer on Feb 2, 2010 5:32 PM

    Hello Lekha,
    thank you for your answer. I think there might be an other reason for this problem. When I debug the view with the Webdynpro-Debugger the valueset in the context contains the correct values but the dropdown shows wrong values.
    You also sent me a link with a codesample. In this coding you use the following statement:
    lr_drp_idx->set_texts( 'VALUESET'   ). This is a method of the class CL_WD_DROPDOWN_BY_IDX. I used the class cl_salv_wd_uie_dropdown_by_idx as I'm working with an ALV-Table. This class doesn't have the method set_texts. Instead it has a method called 'set_valueset_fieldname'. Maybe this method has a bug?
    Regards,

  • Miles/Km configuration with different rate in a month

    Experts,
    I have requirent for mileage rate for one of my client as below -
    In month an employee claim km/mileage for reimbrushment and intial the reate for initial 1500km is $2 and above 1500km i would be $1.
    So an employee can get $2 of rate only for 1500km everymonth.
    Please suggest me how to prceed with this.
    Thanks in advance
    Regards,
    P.S

    Hi there
    If you refer to the IMG
    In Customizing for Travel Management under Travel Expenses
    > Master Data >Travel Expense types >  Create Travel Expense Types for Per Diems/Flat Rates
    here you have the possibility to define different flat rate costs per expense type, The documentation from the IMG will give more information but please give consideration as to whether VAT needs to be included etc also or calculated as tax free depending on country statutory requirements, table V_T706F will be relevant for this activity.
    I hope this helps.

  • How to read frequency channel & voltage channels at the same time with different rates?

    I am using a DAQCARD 6036E with a SCXI-1000 chassis.  I have a SCXI-1100 & a SCXI-1126 modules, along with a SCXI-1124 AO module for voltage output.  I am acquiring several voltage input channels with the SCXI-1100 & one frequency channel (frequency signal upto 12000Hz) with the SCXI-1126.  I want to configure all the channels in the Measurement & Automation so that I can use the Scale function to setup all the channels.  I am using a higher acquisition rate for the frequency channel than the voltage channels.  I had the block diagram as attached.  When I run the vi, I had the resource problem.  The err. msg. is: the specified resource is reserved..  Any suggestions as how to acquire a frequency signal & several voltage signals with this system setup using the DAQ-mx?
    Attachments:
    Document.rtf ‏4727 KB

    Since a common ADC is shared with all your SCXI analog input channels , you will have to sample all channels in a scan list at same sampling rate.
    However, you can set up frequency and voltage virtual channels using different instances of "create DAQmx Virtual channel" function in the same task as shown in attached pic, set scan rate and read them using a single DAQmx read
    Attachments:
    vi.PNG ‏6 KB

  • How to Link two Facts with Different Time Granularity (Year, Quarter) to a Single Time Dimension

    Hello All,
    I have the below scenario where i have Two Facts Fact Quarterly and Fact Yearly but one Time Dimension which has Quarter grain.
    So my question is how do i Establish relationship from Fact Yearly to Time Dimension??
    Ex: 

    Hi naveej,
    According to your description, you want to know how to build the relationship with time dimension and fact tables. Right?
    Based on your screenshot, it's better to have only one fact table for sales and build the relationship with time dimension. To determine quarterly or yearly data only depends on how you slice the time dimension. However, I notice that the Revenue for year
    is different from the aggregated Profit for quarters. If the Revenue and Profit are different measure, you need to have two fact tables. And you should build the relationship (Regular) between TimeDim and FactYearly on YYYY attribute.
    Reference:
    Defining a Fact Relationship
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Licencing SQL Server Per Core on Multiple Nodes with different CPU per Host

     Greetings, 
    I would like to know what kind of licencing I should do in this architecture:
    Cluster with 4 Nodes
    Node 1: 12 Cores;
    Node 2: 12 Cores;
    Node 3: 16 Cores;
    Node 4: 16 Cores;
    Having 4 Instances licences by core:
    Instance01 and Instance02 are installed at node 1 and node 2;
    Instance03 and Instance04 are installed at node 3 and node 4;
    They share the same windows cluster;
    We want to licence the 4 nodes per core (EE)
    We should licencing 2 * 12 Cores + 2 * 16 cores or 4*16 cores licence?
    There is any reference to support?
    Thank you in advance, 
    João B Martins

    Hi,
    if instance01 runs on node1 and instance02 runs at node2 (i.e. active-active cluster) you have to license all cores so buy 12 packs of 2 cores each of SQL Server 2014 EE.
    if instance03 runs on node3 and instance04 runs at node4 (i.e. active-active cluster) you have to license all cores so buy 16 packs of 2 cores each of SQL Server 2014 EE.
    this is the worst scenario 12+16=28 license.
    if may also deploy an active-passive cluster (i.e. instance01 and instance02 running, in normal condition, all in the node01, the same behaviour with inst03 and04) you can buy half the license. In this case you have to buy SA to have rights for running the
    passive node.
    The key is if the CPUs on the active node are able to do the job. Because the cost of EE license is cheaper to buy a most powerful CPU than buy more EE license.

  • Different requestors per SC item

    Hello.
    Maybe you can give me a hand with this problem.
    We found a SC with different requestors per item. When I display SC in BBP_PD we notice that "requestor" GUID is different and also the name behind. In changes we cannot find anything and we suppose that person who created the SC changed anything or created in a way that caused this.
    When PO is created the header "requestor" have value "multiple".
    Any of you can tell me how is possible that an user can create a SC with different requestors per item?
    Many thanks in advance and kind regards.

    is it something shop on behalf ?
    Best Regards,
    Anil

  • How can I edit multiple clips with different frame rates on the same timeline

    how can I edit multiple clips with different frame rates on the same timeline

    You do not want to edit material from different frame rates on one timeline. You CAN do this, but it is a very bad idea - and this is why.
    Once you establish the sequence frame rate - lets say it is PAL material at 25fps, any material that you drop into the sequence other than 25 fps will have to be changed to play at 25 fps. If the material you add is NTSC (29.97), FCP will DROP 5 frames per sec to bring the frame rate down to 25 fps. Which 5 get thrown away? Every 6th one. This yields a funky cadence that becomes even more complex as as there are also interlaced fields (DV/NTSC is an interlaced format). Oh, and by the way, the image sizes are different as well. DV/PAL has 576 lines of resolution and DV/NTSC has 480. FCP has to scale up the NTSC to fit the PAL frame.
    You do not want FCP adjusting these things on the fly. You want to do a thoughtful (and time consuming) conversion so that you end up with all your material in one format with the best possible image from the conversion process. Compressor can do an adequate job with Frame Controls turned on. The Natress Standards Conversion FCP plugin is another way to go. A third option is to find a post house that can do the conversion for you using a hardware based process.
    The good news is, once everything is in the same format, editing it will be painless and the output process very quick.
    Whatever frame rate/ image size you select, I'd suggest using ProRes for the codec. It is 4:2:2 color and will withstand color correction and composting with much more grace than any variant of DV based codecs.
    Have fun.
    x

  • How can I record several channels of data at different rates with the same card?

    I am building an application in which I need to record several channels of DC voltage data to disk at different rates, for example, Channel 1 at 40 Hz, Channels 3-5 at 10 Hz, Channels 6-8 at 1 Hz, etc.
    All these channels are time-referenced, so I need to make sure data for channels recorded at slower rates line up with their correct time stamp.
    Currently, I am building all data into a 2D array one row per loop iteration.

    Hello;
    At this time, the NI DAQ boards have only one scan clock, so, you can only define one valid scan rate for all of your channels.
    The better approach for you is to sample all channels at the highest rate you will need, and then discard the samples you don't need to save.
    Hope this helps.
    Filipe

  • COPA Document with different exchange rate

    Hi
    We have created a Sales Order in 2007.
    Now in 2008 we have raised credit request for this order. The accounting doc generated correctly and currency translated as per the exchange rate maintained in the table as on today.
    But the copa document generated with the exchange rate of 2007.
    Can you please let us know is it the correcy way of behaviour or the COPA doc also should generate with current date exchange rate.
    Thanks and Regards
    RS

    Hi Ram
    Thanks for your reply.
    This is my scenario.
    The company code currency is THB.
    The second local cuurency is USD.
    The Operating currency is USD.
    Reporting Currency is USD.
    We have created a Sales order in December 2007 for currency THB. The billing document and accounting document also generated in the same year. The exchange rates are picked correctly as per the exchange rate table.
    The exchange rate is @42. The COPA document also created with exchange rate @42.
    Now in the month of January a credit note created against the order. The accounting doc generated @32 as per the exchange rate tables. But the COPA document generated with exchange rate @42.
    This is happening only for the credit notes.
    Can you please let us know is this standard behaviour or something wrong with customization.
    Best Regards
    RS

  • Asset Register with different Fiscal Year Variant

    Ministry Of Commerce requires Power Line Carrier Companies to maintain
    an additional fixed asset register. This register needs to have
    Fiscal Year - April to March
    Revaluation of Assets on 1 April every year based on indice provided
    Ministry.
    Depericiation Rates same as existing
    Staright line depreciation
    No depreciation / revaluation of new assets aqired during the year
    No depreciation on disposal of assets during the year
    This can work OK for Companies with same Fiscal Year Variant (April to
    March).
    What are the options for Companies with different Fiscal Year?
    Some of the companies do not have the new GL activated and hence cannot
    use the additional ledger and use for this purpose.
    Can you please advise.
    Regards,
    Suneel Bhonsule

    If the company codes are using fiscal year variant April - March, then it is possible. If the company codes are using differant fiscal year variant other than April - March and if you want to get the report with the Fiscal year April-March,, it will not work out..
    Even If new GL Activated for all company codes also its not possible.. i had a experience of this and finally came to know that parellel ledger or special ledger concept will not support for Diefferant fiscal year for Asset accounting alone which is differant from Company code fiscal year..
    Thanks
    Fit 4 Nothing

  • Government Securities with different Interest Coupon Rates

    Government Securities with different Interest Coupon Rates
    For example, Company acquires  government securities with fixed interest frequency but different interest rates
    Government Securities – 7% Maturity Period 1 year
    Government Securities -8% Maturity Period 2 years
    Government Securities 9% Maturity Period 3 years
    How to configure the above requirement

    Dear Krishna,
    You can fulfill all your requirement with product type 04 series will be helpful.
    There is no specific customization required in case you are using standard system.
    Regards,
    Jain

  • GR & GR cancellation value is differing with exchange rate

    Hi experts,
    Here a challenging issue.  I was  raised a  Thirdparty PO and I did GR(a special case) and  I did IR also
    Due to some reasons  I have to cancel the IR the below are the differences
                                             for 64 pieces value is 21,339.97 CAD
    and if i reverse(credit memo)for same qty valule is 21,592.29 CAD ok
    now i am going to  GR  DOC  for 100 qty   value is  38,347.89 CAD
    for the same  reversal                              value is  33,946.63-  why these differences is coming any one can have the idea? My vendor currency is  EUR   and Co code currency is  CAD.  I Went  through OB08
    also but there is no use. U please suggest me any config things i was left.
    Thanks
    SR

    The system behaviour you are describing is the correct one. Please,
    kindly consider the information contained under the attached note:
    191927 - Posting logic: GR for foreign currency PO.
    As stated in it:
    Postings to the material stock account (BSX):
    In order to be able to determine the value of the stock posting, the
    valuation methods which exist in the material master in local currency
    (standard price, total value of stock) must be converted into document
    currency. This translation is thus carried out on the posting date with
    the exchange rate type that is assigned to the FI document type used,
    that is, independent from the exchange rate defined in the purchase
    order!
    If no exchange rate type is assigned to an FI document type, the system
    uses exchange rate type M.
    Please, check in your system the settings stored in the customizing
    transaction OBF4 for the document type WE (Goods receipt). If the field
    'Exch.Rate Type for foreign currency documents' is empty, the exchange
    rate type M is used.
    The fixed conversion rate in the purchase order refers to the valuation
    approach in the purchase order and, therefore, to the costs for the
    purchased material. Therefore, the posting amount to the GR/IR clearing
    account (WRX) is converted according to the fixed conversion rate in the
    purchase order header.
    On the other side the fixed conversion rate in the purchase order is not
    designed for converting the posting values to the material stock account
    (BSX). This conversion reflects the situation of the valuation of the
    material stock and is therefore designed to be independent of the
    conversion rate defined in the purchase order. This is what note 191927
    outlines.
    Therefore, in the standard system behaviour, the cancellation does not
    really recalculate the currency translation, but uses the Purchase
    Order history instead:
    .- If there was only one Goods Receipt, the WRX is supposed to be the
    the same for 102 as it was for 101.
    .- If there were several Goods Receipts with different exchange rate
    values, then, the WRX for the 102 will be done with the average
    value, just as the also attached note 49995 describes.
    The currency translation for the stock value is done within the MM-IM
    function pool MBGB (MB_CALCULATE_VALUES etc.). It is always done using
    currency type M and the posting date. We never use another date or
    rate there.
    Hope the information help.

  • B1 and SQL Server 2005 performance with 3.000.000 invoice-lines per year

    I would like to know if SAP Business One with SQL Server 2005 could work with the following information:
    - 40.000 Business Partners
    - 40.000 Invoices per month
    - Aprox. 3.000.000 invoice-lines per year
    Of course it will be necessary to change some forms in B1.
    What do you think?
    Do you know any B1 customer working with that amout of data?

    > Hi,
    >
    > I think a good SQL2005 tuning (done by a good DBA)
    > will improve performance. Number of records like that
    > shouldn't hurt that kind of DB engine...
    Hi,
    I'm sure that MSSQL2005 can handle the amount of records & transactions in question. Even MSSQL 2000 can do it. However, any DB engine can be put on its knees with the combination of 2-tier application architecture and badly designed queries. B1 is a case in point. I wouldn't go into such a project without decent preliminary load testing and explicit commitment for support from SAP B1 dev team.
    I have heard from implementation projects where B1 simply couldn't handle the amount of data. I've also participated in some presales cases for B1 where we decided not to take a project because we saw that B1 couldn't handle the amount of data (while the other features of B1 would have been more than enough for the customer). The one you're currently looking at seems like one of those.
    Henry

  • Company codes with different fiscal year variants in a controlling area

    Hi all,
    When I try to assign a company code with different fiscal year variant than controlling area I get error. It is ok so far.
    However, after assigning company with same fsv to controlling area the system lets me to change company code's fsv in company code global settings and I can even save it.
    So I wonder how it would be possible ? Why do I get just a warning instead of an error and save ?
    Thanks and regards.
    M.Yusuf Dogan

    Hi Bulut,
    There are 12 normal and 3 special periods in the fsv of the company code which i'm trying to assign. However, controlling area's fsv has 12 normal and 4 special periods.  I get an error message "KT297".
    Actually, my point is that if the company code's fsv is same with co's I can assign but the system lets me change cc's fsv after assignment.
    M. Yusuf Dogan

Maybe you are looking for

  • Problem with Watch Service in Window 7

    This code works fine in Linux but not in Windows 7: to get file contents update I have to click on the output file. Where is the trick? I am using Windows 7 prof, NetBeans IDE 8.0 RC1 (Build 201402242200) updated to version NetBeans 8.0 Patch 1.1, JD

  • Itunes install fails due to apple application support

    I cannot get the install of itunes to complete. at the end of the routine I get "apple application support" not found iTune helper

  • Content rollup using search

    is it possible to rollup same list from different subsites  using search. If so, could you please help me with a link. tnx

  • Alert in MsExcel while downloading

    i am facing the following alerts while opening a ms excell file from a jsp page, 1)too many different cell formats. 2)Excel encpuntered an errorand had to remove some formatting to avoid corruoting the workbook. please re-check your formatting carefu

  • How can we split limit row counts for DB2?

    We want to mass data from DB2. but, we guess 200,000,000 count. so we try to split by 5,000 count and almost 5 MB. How can we use sql query for DB2? How can we make JDBC Sender? but, We don't use update query. because Customer did not allow ours requ