Formula to go across years and months to find the value

Hello,
I am having difficulty writing a member formula where the rate is supposed to come from anyplace that's available prior to that month and year. This is for Re-forecasting purposes.
The example of how the concept should work is shown below. I have tried @priors, @shift, and @rangelastval. None of these calculations have been able to go through multiple years at the same time to get the rate from previous years and month. It works in the same year across the periods but not both periods and years.
Any idea what calculation function or a combination of calculation functions I can use so the calculated amount goes back as many years and months possible until it finds the rate.
Year
Periods
      Rate
Amount
Calculated amount
FY15
Jan
0
100
0
FY15
Feb
0
100
0
FY15
Mar
0.4
100
40
FY15
Apr
0
100
40
FY15
May
0
100
40
FY15
Jun
0
100
40
FY15
Jul
0
100
40
FY15
Aug
0
100
40
FY15
Sep
0
100
40
FY15
Oct
0
100
40
FY15
Nov
0
100
40
FY15
Dec
0.3
100
30
FY16
Jan
0
100
30
FY16
Feb
0
100
30
FY16
Mar
0
100
30
FY16
Apr
0
100
30
FY16
May
0
100
30
FY16
Jun
0
100
30
FY16
Jul
0
100
30
FY16
Aug
0
100
30
FY16
Sep
0
100
30
FY16
Oct
0
100
30
FY16
Nov
0
100
30
FY16
Dec
0
100
30
FY17
Jan
0
100
30
FY17
Feb
0.5
100
50
FY17
Mar
0
100
50
FY17
Apr
0
100
50
FY17
May
0
100
50
FY17
Jun
0
100
50
FY17
Jul
0
100
50
FY17
Aug
0
100
50
FY17
Sep
0
100
50
FY17
Oct
0
100
50
FY17
Nov
0
100
50
FY17
Dec
0
100
50
FY18
Jan
0
100
50
FY18
Feb
0
100
50
FY18
Mar
0
100
50
FY18
Apr
0
100
50
FY18
May
0
100
50
FY18
Jun
0
100
50
FY18
Jul
0
100
50
FY18
Aug
0
100
50
FY18
Sep
0
100
50
FY18
Oct
0
100
50
FY18
Nov
0
100
50
FY18
Dec
0
100
50
FY19
Jan
0
100
50
FY19
Feb
0
100
50
FY19
Mar
0
100
50
FY19
Apr
0
100
50
FY19
May
0
100
50
FY19
Jun
0
100
50
FY19
Jul
0
100
50
FY19
Aug
0
100
50
FY19
Sep
0
100
50
FY19
Oct
0
100
50
FY19
Nov
0
100
50
FY19
Dec
0
100
50
FY20
Jan
0
100
50
FY20
Feb
0
100
50
FY20
Mar
0
100
50
FY20
Apr
0
100
50
FY20
May
0
100
50
FY20
Jun
0
100
50
FY20
Jul
0
100
50
FY20
Aug
0
100
50
FY20
Sep
0
100
50
FY20
Oct
0
100
50
FY20
Nov
0
100
50
FY20
Dec
0
100
50
FY21
Jan
0
100
50
FY21
Feb
0
100
50
FY21
Mar
0
100
50
FY21
Apr
0
100
50
FY21
May
0
100
50
FY21
Jun
0
100
50
FY21
Jul
0
100
50
FY21
Aug
0
100
50
FY21
Sep
0
100
50
FY21
Oct
0
100
50
FY21
Nov
0
100
50
FY21
Dec
0
100
50
Thanks in advance!

ELSE
IF (@PRIORS(SKIPMISSING, RATE) == #Missing)
  IF (@ISMBR(&FcstYear7))
   "Amount"=Amount*@PRIORS(SKIPMISSING,"Rate",(&FcstStartMo:"Dec"->&FcstYear1, "Jan":"Dec"->&FcstYear2,"Jan":"Dec"->&FcstYear3,"Jan":"Dec"->&FcstYear4,"Jan":"Dec"->&FcstYear5,"Jan":"Dec"->&FcstYear6)));
similarly repeated for the years 6,5,4,3,2 but it gave the following error "Error: 1200400 Error executing formula for [Check_1] (line 9): scalar double argument expected in function [@_UMINUS]"
How can I use XRANGE in this because the function has the following limitation?
@XRANGE can be used only in these functions: @AVGRANGE, @SUMRANGE, @MINRANGE, @MINSRANGE, @MAXRANGE, @MAXSRANGE, @STDDEVRANGE, @MOVSUM, @MOVAVG, @MOVMIN, @MOVMAX, @MOVMED, @SPLINE.

Similar Messages

  • Why the App Store ask for sq.after using it for years and how do find the answers

    Why the App Store ask for sq.after using it for years and how do find the answers

    Reset security questions
    http://support.apple.com/kb/HT5312
    If you do not have a Rescue email, you need to contact apple support, they will guide you through the process of resetting your security questions.
    https://ssl.apple.com/emea/support/itunes/contact.html

  • How to add a new metadata field to iPhoto where new field is calculated as age in years and month based on a specific date and the date photo was taken ? I want to calculate and display the age of my two kids on every photo.

    Hi
    How can I add 2 new metadata-fields to every photo in iPhoto ?
    The new fields should state the age of my kids in years and months based on the date that they were born and the date that photo is taken.
    Exampel:
    My son is born 01.01.2010
    My daughter is born 01.01.2012
    Photo taken by data
    Aage of son
    Aage of daughter
    01.07.2011
    1 year 6 month
    not born yet
    01.01.2014
    4 year 0 month
    2 year 0 month
    I would like to be able to search by kids age and get the info displayed when doing slideshows.
    How to do this in iPhoto ?
    Any alternatives to accomplish the same ?
    Kind regards

    It can't be done with iPhoto.  There are some DAM (digital asset management) applications that can write to other IPTC fields that iPhoto can't read. One such app is Media Pro 1.
    However you would have to calculate the age for each date and add it to one of the fields. There are online age calculators that can do that for you: Age Calculators
    If you go thru that much trouble then use iPhoto, make the calculations and add the age to the Description field.  Then you can use Smart Albums to search for 1year 6 month text.
    OT

  • The last few times I imported photos, the backup location was set to "documents" with no sub-folders. How do I get them into sub-folders - like year and month?

    the last few times I imported photos, the backup location was set to "documents" with no sub-folders. How do I get them into sub-folders - like year and month?

    Use the Subfolder pulldown to set the subfolders:

  • Key Figure format in Years and Months..

    Hi,
    Is there any Key figure similar to 0SRVCLENKYF (Length of Service (in Years)) part of Headcount and Personnel Actions, which should give me value in Years and Months..?
    Thanks in Advance,
    Thanks,
    Madhu.

    For curiousity sake...if you use the FIMA_DECIMAL_MONTHS_AND_YEARS Function Module, the output that you'll get is a months and years in fractional amounts. So, how are you going to get the Years and Months from this?
    For example, if the from date is 20000101 and the to date is 20090914, the results from this Function Module will be Months = 116.42740 and Years = 9.70228. If you do use this, I'd suggest taking the whole number from passed value for years (9 in this example) and then calculate months by taking the franctional amount of the passed value for years and multiple it by 12 (0.70228 * 12), you end up with 9 Years, 8 Months (8.42736 to be exact, but you're going to want to truncate it to 8 so that when it goes above 8.5, the value doesn't become 9 when it still should be 8).

  • Year and Month calculation

    Hi
    I have created a report with two prompts, they are "Enter Start date:" and "Enter End date:" where i take date values from a calendar while prompting.
    For example:
    Start date = 10/11/2003
    End date = 10/10/2003
    If i want to display the End date means, i ll use UserResponse("Enter End Date:") in the webi reports. What should i do to calculate Year and Month from this user response value,
    i used these calculations below, but it is not working, showing me #ERROR message.
    1) ToDate(UserResponse("Enter End Date:");"dd/MM/yyyy")     =  #ERROR
    2) FormatDate(ToDate(UserResponse("Enter End Date:");"dd/MM/yyyy");"dd/MM/yyyy")     = #ERROR
    3) Year(UserResponse("Enter End Date:")   = The expression or sub-expression at position 6 in the 'Year' function uses an    invalid data type. (WIS 10037)
    4) FormatDate(ToDate(UserResponse("Enter End Date:");"dd/MM/yyyy  hh:mm:ss A");"MM/dd/yyyy") =#ERROR
    so help me how to get the year and month values from prompts ?
    Thanks
    Dineshkumar

    to get the Month Value and year value in Webi
    month name
    =Month(ToDate(UserResponse("Enter End Date:");""))
    month number of the year
    =MonthNumberOfYear(ToDate(UserResponse("Enter End Date:");""))
    to get the Year Value
    =Year(ToDate(UserResponse("Enter End Date:");""))
    good luck

  • Alpha numeric numer ranges for Shopping Cart based on year and month

    Dear All,
    My client requirement is that Shopping cart number should be generated based on year and month specific.
    Though it is possible through smart numbering, it should generate automaticaly.
    For eg:- Shopping cart generated for March 2011 should be  1103SC00001 to 1103SC99999
                  Shopping cart generated for June   2011 should be  1106SC00001 to 1106SC99999
                  Shopping cart generated for January 2012 should be  1201SC00001 to 1201SC99999
    Is thera any badi available for this.
    Regards,
    Raju

    why dont you add this to description field?

  • What is the best way to dynamically create table partition by year and month based on a date column?

    Hi,
    I have a huge table and it will keep growing. I have a date column in this table and thought of partition the table by year and month. Can any you suggest better approach so that partition will create automatically for new data also along with the existing
    data? Nothing but automatically/dynamically partition should create along with file group and partition files.
    Thanks in advance!
    Palash 

    Also this one
    http://weblogs.sqlteam.com/dang/archive/2008/08/30/Sliding-Window-Table-Partitioning.aspx
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Album By Year -- and month? (Sorting when an artist has 2 albums in 1 year)

    I love having my music collection sorted by Artist and within Artist by Album by Year. This effectively presents each artists' entire catalogue as a set, with each album in the order of release date. Perfect.
    But what if an artist releases more than one album or single in a year?
    Then the sorting of Album by Year breaks down.
    Two albums in the same year appear to iTunes to have been released at exactly the same time. iTunes gives up, looks at the two albums' titles, and sorts them in alphabetical order. That's kind of lame.
    Is there some way to specify the year AND MONTH of release?
    I tried adding a decimal to the year field, figuring that would at least be close enough to get them in chronological order, but it won't accept more than 4 digits.
    The obvious workaround is to rename the albums, for example rename the second album with a "Z" so it will be forced into second place when iTunes gives up and goes alphabetical. Or, use entirely fake years. But neither workaround is proper.
    Is there any legitimate way to tell iTunes what to do?
    Gateway NX250X Windows XP Pro

    Hi, Will.
    But neither workaround is proper.
    Indeed.
    Is there any legitimate way to tell iTunes what to do?
    Unfortunately, as far as I know there is not so your workarounds seem like the best way of dealing with the situation - it's either that or eliminating artists who release more than one record in any given year from your Library. ; - )
    All I can suggest is you go to the man and let him know what you'd like to see in a future version of iTunes: http://www.apple.com/feedback/itunesapp.html

  • Extract Data Based on Year and Month

    My clients have taken an Oracle DB TimeStamp field and
    downloaded it to Access in a TEXT field format.
    Sample data: 20060401001348CS
    All I am trying to do is extract data based on year and
    month. I have equal to 200604*, 200604%. Have also tried to used
    LIKE.
    Nothing works. It just can't be that dificult. Please help.
    Thanks

    After breaking my inquiry down into bits and pieces the
    problem is not just the LIKE, it is a combination of events. The
    entire picture is this:
    User selects Year from a drop down (2006), then selects month
    from drop down (04). I then build a variable called
    EventReport Date with the statement <cfset EventReportDate
    = Session.InquiryYear & Session.InquiryMonth & "%">
    It correctly displays as 200604% - When used by itself as
    below, it works just fine.
    WORKS
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE CDTS LIKE '#EventReportDate#'
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    WORKS (additional WHERE criteria)
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE ((AG_ID = '#Session.InquiryAgencyCode#') AND (CURENT =
    'T'))
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    FAILS **** There is something wrong with the combination of
    the WHERE clause items
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE ((AG_ID = '#Session.InquiryAgencyCode#') AND (CURENT =
    'T')
    AND (CDTS LIKE '#EventReportDate#'))
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    NOTE: There is not an error message, it just comes back with
    zero records.
    MORE LOST THAN EVER! Thanks for your help
    Ron

  • How to Get the numeric equivalent of Year and Month with this format....

    Hi Experts!
    I just would like to know how to get the numeric equivalent of the Year and Month if the given format is like this....
       31-May-07
    where:
    31 is the Day
    May is the Month
    07 is the Year
    Is there a function in ABAP to do this? I wouldn't mind hardcoding for the Month, but what I'm after is the year.... they only gave me 2 digits for the year... and I would like to extract 4 digits from it... do ABAP still recognize it as '1907'? I think not...
    Please help me on this experts and Thank you in Advance!!!
    More Power!

    Hi Jayson,
    You can require 2007 or 2017 or 2027..
    or 1937 . or 1947 .. so on,
    so just put a logic based on this. Just hard code as
    lets say value is 31-May-07 (9 char field)
    Case field+7(1).
    WHEn 0.
    concatenate '200' field+8(1) into year.
    WHEN 1.
    WHEN 2.
    WHEN 3.
    jsut code like this and check the syntaxes.
    Reward points if useful.
    Regards,
    Atish

  • T:inputCalendar year and month only

    Hej there,
    I'd like to use t:inputCalendar to allow the user only to choose a certain year and month, so not including the day.
    I'm not sure if it's possible at all, but I started out using this:
    <t:inputCalendar renderAsPopup="true" popupSelectMode="month" popupDateFormat="MM" />
    So now the user has a button, but when s/he clicks on it, the full calendar is shown, including the days.
    How do I get rid of that?
    Thanks,
    David

    When you are not really using date, you might as well think of a different solution altogether.
    Probably you can have two separate drop-down lists for selecting the month and the year.
    DavidTarr wrote:
    Hej there,
    I'd like to use t:inputCalendar to allow the user only to choose a certain year and month, so not including the day.
    I'm not sure if it's possible at all, but I started out using this:It is possible to convert the pattern using convertDateTime. But this only converts the text field display.
    <f:convertDateTime type="date" pattern="MM-yy"/>
    <t:inputCalendar renderAsPopup="true" popupSelectMode="month" popupDateFormat="MM" />
    So now the user has a button, but when s/he clicks on it, the full calendar is shown, including the days.
    How do I get rid of that?I am not sure if you can get rid of that. Obviously, no body would expect to see a calendar without dates. It does not make much sense.
    >
    Thanks,
    David

  • FM takes year and month as input and give firstdate and lastdate as output

    Hi,
    Can any one tell me any <b>function modules which takes year and month as inputs and gives first date and last date of that month as outp</b>uts.
    Regards,
    Gurprit Bhatia
    Message was edited by:
            GURPRIT BHATIA

    Hi Gurprit,
    You can use this.
    data : ws_date type sy-datum.,
             ws_edtae type sy-datum.
    constants : c_01 value '01'.
    CONCATENATE ws_date c_01 INTO ws_stdate.
    CALL FUNCTION 'HR_JP_ADD_MONTH_TO_DATE'
          EXPORTING
            iv_monthcount = ws_01 (1)
            iv_date       = ws_stdate ( eg :01.01.2007)
          IMPORTING
            ev_date       = ws_edate. (eg : 31.01.2007)
    Reward if useful.
    Regards,
    Chitra

  • Field Date year and month

    Hi, 
    I'd like to get only year and month field. E.g. 201409.
    Could you please let me know how to do it?
    ddwrt:FormatDate(ddwrt:Today(),0804,1)
    Thank you. 

    Hi Denis - Can you use like:
    formatted date "=TEXT(pickdate,"m") & "/" & YEAR(pickdate)"
    http://weekbeforenext-blog.blogspot.in/2011/06/extracting-month-and-year-from-date-and.html
    -prs

  • How do I put all my photos in albums by year and month

    I've downloaded "My Pictures" to my Organizer. I've lost the album names I had "My Pictures" organized under. I just have individual pictures. How do I get the album titles back?

    Let me advise you not to create albums by month and year, and instead turn on the Timeline in PSE. This will allow you to see your photos from any month or group of months, with virtually zero effort on your part, compared to the effort of creating albums.

Maybe you are looking for

  • I bought a £15 itunes card to download some music on to my iphone but it wont take any money off it and keeps asking for my card details,

    This is the first time i have brought an itunes voucher to use on my iphone, i have been able to redeem it and it shows up on my account but it wont take any money off it and it just keeps asking for my apple id all over agin and for my card details.

  • Clearing with customer & Vendor

    I have customer who is vendor and vendor who is customer.I have assigned customer no in vendor master and vice versa. I forgot to click the indication Clearing with cust/vend. I have posted the TRansactions now i Have ticked the Clearing with cust/ V

  • TS1436 Burn does not go in order of playlist

    I have created a playlist to burn to a CD....it does not burn in order.  What is wrong:

  • Flex ant html-wrapper

    I cannot get the Flex ant tasks to run. I have copied the lib/flexTasks.jar to my project. - created a Proj-config.xml - created a Wrapper-build.xml - created an External Run Config that points to my Wrapper-build.xml. I keep getting Exception Occurr

  • Where is the 'Find' feature?  It worked

    I can't seem to find anything with Spotlight using Snow Leopard.  Since 1984 I have used the 'Find' feature with my Mac's and now nothing shows up when I use Spotlight.  Even though I can physically search for the item and find it exactly the way I s