Re:Rolling 12 Months

Hi Gurus,
I need to achieve [netvalue] of current month and previous 11 months i.e rolling 12 months net value.
In universe there is no date object , there's only Fiscal year(number) and Fisal month(string)
How Can i achive the Total net value of rolling 12 months.
Please Guide me How can i do this in BOXI 3.X.
Regards,
Ranganath

Hi solved myself
the formula is
=(Year(CurrentDate())*12 + MonthNumberOfYear(CurrentDate()))-ToNumber(Left([Fiscal Yr - Month];4))*12 +ToNumber(Right([Fiscal Yr - Month];2))
netvalue where above variable is less than 12
Regards,
Ranganath

Similar Messages

  • Using an expression in SSRS to display rolling 12 month and year to date volumes

    I need some help in writing an expression in SSRS. I have a table that contains date columns and rows that contain different types of data groups. (e.g. total number of items received during the month, total dollars for the month, etc.) I want to add two
    new columns to the end of the report that will display a rolling twelve month total for each of the different rows of data. Plus a column that would show year to date totals for the same rows.
    I was thinking I could accomplish this by adding expressions for each row in the new 'rolling twelve month' and 'YTD' columns in my report however, I'm not sure how to structure the expressions to achieve this.
    Here is an example of how my report currently looks. (I added a pipe delimeter in case the formatting changes once this is submitted.)
                             Jan-2014 | Feb-2014 | Mar-2014 | Apr-2014 | Rolling 12 mth | YTD
    Items received     100 | 35 | 45 | 12 | 192 | 192
    Dollars                $50.00 | $25.00 | $120.00 | $15.00 | $210.00 | $210.00
    Any guidance you can provide would be appreciated.
    Thank you  

    This example shows how to get what you need. It'll take modifying your query to add two cased columns onto the end.
    DECLARE @forumTable TABLE (periodYear INT, periodMonth INT, periodMonthName VARCHAR(12), periodDollars MONEY, periodItems INT)
    DECLARE @i INT = 0
    SET NOCOUNT ON
    WHILE @i < 24
    BEGIN
    INSERT INTO @forumTable (periodYear, periodMonth, periodMonthName, periodDollars, periodItems)
    VALUES (YEAR(DATEADD(MONTH,-@i,GETDATE())), Month(DATEADD(MONTH,-@i,GETDATE())), DATENAME(MONTH,DATEADD(MONTH,-@i,GETDATE())), 1000-@i, 100-@i)
    SET @i = @i+1
    END
    SET NOCOUNT OFF
    SELECT *,
    CASE WHEN CONVERT(VARCHAR,periodYear) + '-' + CONVERT(VARCHAR,periodMonth) + '-01' > DATEADD(MONTH,-12,GETDATE()) THEN periodItems ELSE 0 END AS ytdItems,
    CASE WHEN CONVERT(VARCHAR,periodYear) + '-' + CONVERT(VARCHAR,periodMonth) + '-01' > DATEADD(MONTH,-12,GETDATE()) THEN periodDollars ELSE 0 END AS ytdDollars
    FROM @forumTable

  • How to calculate a rolling 12 months to date calculation?

    Hi there
    We have a business requirement to calculate a rolling 12 month to date value. That is, for any month, sum up the last 12 months of data. E.g. for June 2011, its May 2010 -> June 2011. We have the standard Year and Period dimension, and the member which holds this calculation is in another dimension called TimeView. TimeView just holds dynamic calculations for Month To Date(MTH), Year To Date (YTD) etc.
    The problem I am having is because we have the standard Year and Period dimensions so I need to do a cross dimensional sum. All the solutions I am trying either give me an insufficient dynamic calc cache (increase lock block setting) or something similar. Our lock block setting is quite high and it doesnt seem to make a difference when I increase it.
    Anyway, I have tried a few solutions:
    Short one:
    @SUMRANGE("MTH",@MDSHIFT(@CURRMBRRANGE(Period,LEV,0,1,),-1,"Year",)) + @SUMRANGE("MTH",@CURRMBRRANGE(Period,LEV,0,,0));
    Long one:
    IF(@ISUDA(ACCOUNT,"Flow"))
         IF(@ISMBR(Jan))
              YTD->Jan + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jan,-1,"Year",);
         ELSEIF(@ISMBR(Feb))
              YTD->Feb + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Feb,-1,"Year",);
         ELSEIF(@ISMBR(Mar))
              YTD->Mar + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Mar,-1,"Year",);
         ELSEIF(@ISMBR(Apr))
              YTD->Apr + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Apr,-1,"Year",);
         ELSEIF(@ISMBR(May))
              YTD->May + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->May,-1,"Year",);
         ELSEIF(@ISMBR(Jun))
              YTD->Jun + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jun,-1,"Year",);
         ELSEIF(@ISMBR(Jul))
              YTD->Jul + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jul,-1,"Year",);
         ELSEIF(@ISMBR(Aug))
              YTD->Aug + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Aug,-1,"Year",);
         ELSEIF(@ISMBR(Sep))
              YTD->Sep + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Sep,-1,"Year",);
         ELSEIF(@ISMBR(Oct))
              YTD->Oct + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Oct,-1,"Year",);
         ELSEIF(@ISMBR(Nov))
              YTD->Nov + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Nov,-1,"Year",);
         ELSEIF(@ISMBR(Dec))
              YTD->Dec
         ELSEIF(@ISMBR(Q1))
              YTD->Mar + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Mar,-1,"Year",);
         ELSEIF(@ISMBR(Q2))
              YTD->Jun + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jun,-1,"Year",);
         ELSEIF(@ISMBR(Q3))
              YTD->Sep + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Sep,-1,"Year",);
         ELSEIF(@ISMBR(Q4))
              YTD->Dec
         ELSEIF(@ISMBR(H1))
              YTD->Jun + @MDSHIFT(YTD->Dec,-1,"Year",) - @MDSHIFT(YTD->Jun,-1,"Year",);
         ELSEIF(@ISMBR(H2))
              YTD->Dec
         ELSEIF(@ISMBR("YearTotal"))
              YTD->Dec
         ENDIF
    ELSEIF(@ISUDA(ACCOUNT,"First"))
         MTH->Jan;
    ELSE
    MTH;
    ENDIF
    I am sure this may be a common requirement across companies - does anyone know a solution to this?
    Much appreciated!

    Closing this thread, just needed to increase cache levels.

  • This Year / Last Year on Rolling 12 months

    I have a requirement to create a LY vs. TY comparison report with rolling 12 months - which means, TY measure will be the fact from current date to 12 months ago and the LY measure will be from 12 months ago to 24 months ago.
    I was hoping to use the AGO function to calculate the LY and create a filter in the report using - Date between (SQL_TSI_YEAR, -1, CURRENT_DATE ) and CURRENT_DATE.
    But this does'nt seem to be working. The result splits the AGO measure based on the year, instead of just summing the sales amount. Would anyone have a better idea on how I can achieve this?
    Prompt response would be greatly appreciated.
    Thanks,
    Ruchi.

    Thanks for your responses. I shall take a look at the blog.
    Meantime, I dont have month or year on the report. The metric is supposed to be summed by the rolling 12 months. and calendar is not on the report.
    Anyway by which I can create 2 different metrics for rolling 12 months as TY and from 12 to 24 months as the LY, instead of havng to create a filter on the report?
    Thanks again,
    Ruchi.

  • Rolling 12 months

    dear all,
    i tried searching for some articles or blog on the net but found nothing useful... i want to create a rolling 12 months e.g. when my user input fiscal year period 1.2007 it will show the entire 2007, from 1.2007 to 12.2007.
    can this be done wihtout the use to CMOD. i dont have access to it.

    Hi,
    You can create a variable over Fiscal Year Period. (Single Value) and then in the columns create a structure with:
    1 element restricted by the variable
    1 element restricted by the variable + 1 (add 1 offset to the variable)
    1 element restricted by the variable + 2 (add 2 offset to the variable)
    1 element restricted by the variable + 12 (add 12 offset to the variable)
    With this method you always have the rolling 12 month.
    Regards,
    Dani

  • Rolling 15 Month

    Hello All,
    I'm trying to create a dynamic filter for a report which shows a rolling 15 months worth of data by default. For example, the current date is the 28/07/2008 I would like to show everything in the report for:
    = 01/07/2008 AND <= 30/10/2009So really Im looking to ignore the day and use the month to filter the report. This causes issues as Month(Date.Date) => MONTH(CURRENT_MONTH) filters months for all the years. 07 / 2008, 07 / 2009 etc
    I can use the TIMESTAMPADD to get values from the 28/07/2008 - 28/10/2009. Is there a function to return the first and last day of the month which I could use? Or any alternate way of creating such filter?
    Thanks

    Thanks Alex,
    I used the below code in the end and this works:
    Date.Date >= (TIMESTAMPADD(SQL_TSI_MONTH, 0, CURRENT_DATE)) AND Date.Date <= (TIMESTAMPADD(SQL_TSI_MONTH, 14, CURRENT_DATE))
    I tried another variation but this did not work due to the original problem with month numbers, I am happy with the above though.
    Month(Date.Date) >= Month(CURRENT_DATE) AND Date.Date <= (TIMESTAMPADD(SQL_TSI_MONTH, 14, CURRENT_DATE))
    Cheers
    Innoveer

  • Rolling 13 months data dynamically

    Hi All ,
    I got the 'Cal year/Month' filed  and it is showing as 04.2010.
    How to make the block to get rolling 13 months data and how to make the block dynamic.
    Could any one please help me on this and how to convert the data 04.2010 to April 2010.
    Many Thanks in advance

    In the first column of the block get the current month data and then add second column for last month data by creating an report level object with the following formula.
    =If(MonthNumberOfYear(CurrentDate()) =1;ToDate("12/01/"+ FormatNumber(Year(CurrentDate())-1;"####"); "MM/dd/yyyy" ); ToDate(FormatNumber(MonthNumberOfYear(CurrentDate())-1;"##")"/01/"FormatNumber(Year(CurrentDate());"####");"MM/dd/yyyy") )
    Similarly, add another column for 'last month - 1' data by creating an report level object with following formula.
    = If(MonthNumberOfYear(CurrentDate()) =2;ToDate("12/01/"+ FormatNumber(Year(CurrentDate())-1;"####"); "MM/dd/yyyy"); If(MonthNumberOfYear(CurrentDate()) =1;ToDate("11/01/"+ FormatNumber(Year(CurrentDate())-1;"####"); "MM/dd/yyyy" ); ToDate(FormatNumber(MonthNumberOfYear(CurrentDate())-2;"##")"/01/"FormatNumber(Year(CurrentDate());"####");"MM/dd/yyyy") ) )
    Similarly, add another column for 'last month - 2' data by creating an report level object with following formula.
    = If(MonthNumberOfYear(CurrentDate()) =3;ToDate("12/01/"+ FormatNumber(Year(CurrentDate())-1;"####"); "MM/dd/yyyy"); If(MonthNumberOfYear(CurrentDate()) =2;ToDate("11/01/"+ FormatNumber(Year(CurrentDate())-1;"####"); "MM/dd/yyyy"); If(MonthNumberOfYear(CurrentDate()) =1;ToDate("10/01/"+ FormatNumber(Year(CurrentDate())-1;"####"); "MM/dd/yyyy" ); ToDate(FormatNumber(MonthNumberOfYear(CurrentDate())-3;"##")"/01/"FormatNumber(Year(CurrentDate());"####");"MM/dd/yyyy") ) ) )
    In a similar fashion continue this logic for last month -10. This will give you the block of rolling 13 months data.
    In the case of date function. If your date is a DATE data type then use FormatDate() or if its a STRING data type then use SubStr.
    Thanks,
    Praneeth

  • List rolling 13 months?

    How can I use SQL to list the rolling 13 months as of today? For example, it's March 2006 right now, and so I want to list 03/01/2006, 02/01/2006, 01/01/2006, 12/01/2005, 11/01/2005, 10/01/2005, ..... 04/01/2005 & 03/01/2005 ? I tried many different ways, but could not figure it out. Thanks for any help.

    Hello
    This is one way of doing it:
    SQL> SELECT
      2     ADD_MONTHS(TRUNC(sysdate, 'MM'), -rn)
      3  FROM
      4     (       SELECT
      5                     rownum - 1 rn
      6             FROM
      7                     dual
      8             CONNECT BY
      9                     rownum <= 13
    10     )
    11  /
    ADD_MONTH
    01-MAR-06
    01-FEB-06
    01-JAN-06
    01-DEC-05
    01-NOV-05
    01-OCT-05
    01-SEP-05
    01-AUG-05
    01-JUL-05
    01-JUN-05
    01-MAY-05
    01-APR-05
    01-MAR-05
    13 rows selected.HTH
    David

  • Rolling 12 months period

    What is the best way to create rolling 12 month periods, from the last period? Thanks

    The best way is to use 0fiscper with a filter range from inserted period variable with offset -12 to inserted period variable.
    Hope it helps.
    Regards

  • Formula: Rolling 6 Months from CurrentDate & With the ability to Group

    Can someone please provide a date formula that will give me the ability to group on the results?  Ultimately seeking to create a rolling 6 month group from CurrentDate.  For example: If today was 11/21/2008, the formula would result with a 6 finite groups of 6/21, 7/21, 8/21, 9/21, 10/21, & 11/21.  Thanks in advance for your assistance.

    Try to use the record selection formula like this
    month({date field})>=month(currentdate)-6 and year({date field})=year(currentdate)
    Now greate a group on date field and use monthly.
    Regards,
    Raghavendra

  • Rolling 12 month report using FR

    Hi All,
    Could you all advice me on how I can create a 12 month rolling report using Financial Reports? Basically what we need is a report where we would be able to see across years, so for example if I were in March and running this report, I'd be able to see my forecasts from March this year up to Feb of the next year.
    Thanks for all answers!

    Hi,
    I have 25 months listed - 12 for current year with months hardcoded and year as a sub variable, 12 for prior year with months hardcoded and year as a sub variable, and one for current month and current year and current month, both as sub variables. I have a custom formula in the column Y , cell [Y,2] which has curent month/current year:
    IfThen([Y]=[A],1,IfThen([Y]=,2,IfThen([Y]=[C],3,IfThen([Y]=[D],4,IfThen([Y]=[E],5,IfThen([Y]=[F],6,IfThen([Y]=[G],7,IfThen([Y]=[H],8,IfThen([Y]=,9,IfThen([Y]=[J],10,IfThen([Y]=[K],11,12)))))))))))
    Then I use conditional suppression by column. Our year starts in October, so in the column "A" I have Oct current year, in "B" - Nov current year etc. Suppression for Dec current year looks like that:
    Suppress column if value in cell Y,2 < Value 3
    Suppression for Dec prior year looks like that:
    Suppress column if value in cell Y,2 >= Value 3
    This approach has huge assumption that two months will not have exactly the same numbers. It's pretty safe, but not perfect. I came here looking for a better solution.

  • Add-On expiry; 30 days or next billing day (rolling 1-month data only contract).

    I'm on a rolling monthly data-only sim/contract. I was running low on my data allowance for this month, so I've added a 10Gb add-on. At each point during the buying process it stated this add-on would expire at my next billing date (about 5 days time) - i.e.even if not used up. However after buying it, the 'thank you' notification and also the subsequent details in 'my account' claim it expires in 30 days (and of course the system is fully aware that my billing day is sooner). It can't be both, and I've found conflicting information when searching for the answer too. I would use the add-on very differently if I had 30 days instead of 5 to use it! Can anyone tell me for sure which it actually is?  CheersKev

    Well its gone past the date my rolling months allowance usually begins on. The good news is that (on this occasion anyway) the addon didn't expire as some parts of the system suggested. Thats assuming by 'billing date' they mean the date of the bill, not the date they subsequently collect payment. Oddly though, the addon is now showing (in 'my account') as 'data left in your plan' rather than as an addon to the plan. And my plan's allowance isn't showing up for this month yet, as if buying the addon has somehow prevented the monthly data contract rolling on (I definately bought an 'add-on', not an 'instead-off'!). So I'm hoping this month's plan is just being queued until the existing addon expires. Which would be completely sensible, but theres nothing (that I can see) to indicate if its the case; currently it looks like there will be nothing left once the small addon runs out. I guess I'll (again) just have to wait to see what actually happens in practice. I'm new to this and so its inevitably a learning curve, but I can't help feel the 'my account' system could be a bit more illuminating :-/ CheersKev

  • DAX - Need help with TotalYTD calculation with Rolling 12 Months (Fiscal Months)

    These are the tables I currently have in my solution:
    DimDate - date dimension - our fiscal periods don't match with calendar periods
    Fact Claims - ID, Date, Doc#, Amount,  ProductKey
    DimDateR12 - fiscal periods with max and min calendar dates - using DatesAdd gave me error because of contiguous dates error, so ended up using this.
    Here are the calculations -
    Issue Count = Distinct count of Products where (Sum of amount >= 1000 and count of claims >= 5) in last 12 fiscal periods - I am using summarize function here.
    I need to add another calculation where I need to count issues resolved.
    Issues resolved = Distinct count of products, where Rolling 12 Claims Amount >= 1000 and claim count >= 5 in the previous fiscal period) and Current fiscal period, NOT(Rolling 12 Claims Amount >= 1000 AND claim count >= 5) - this needs
    to be a cumulative calculation.
    I got Issues Resolved Calculation to work with summarize function, but using TotalYTD (using Fiscal Date key) to get cumulative number, is not working. Here is my calculation - TotalYTD([Count of Issues Resolved],DimDateR12[FiscalDate])
    I tried using All(DimDateR12) filter, but didn't work.
    Any help is really appreciated.
    Thanks,
    Sonal

    These are the calculations I am currently using -
    Rolling12ClaimCount:=CALCULATE(FactClaim[ClaimCount],FILTER(DimDate,AND(DimDate[Calendar Date] >= Min(DimDateR12[StartDate]),DimDate[Calendar Date] <= Max(DimDateR12[EndDate]))))
    Rolling12ClaimAmount:=CALCULATE(FactClaim[ClaimAmount],FILTER(DimDate,AND(DimDate[Calendar Date] >= Min(DimDateR12[StartDate]),DimDate[Calendar Date] <= Max(DimDateR12[EndDate]))))
    IsCurrentIssue:=IF(([Rolling12ClaimAmount] >= 1000) && ([Rolling12ClaimCount] >= 5),TRUE(),FALSE())(([Rolling12ClaimAmount] >= 1000) && ([Rolling12ClaimCount] >= 5),TRUE(),FALSE())
    WasWarrantyIssue:=IF(([PrevFiscalPeriodRolling12ClaimAmount] >= 1000) && ([PrevFiscalPeriodRolling12ClaimCount] >= 5),TRUE(),FALSE())
    Resolvedissues:=IF(AND([IsWarrantyIssue]=FALSE(),[WasWarrantyIssue]=TRUE()),1,0)
    Rolling12IssuesResolved:=SUMX(SUMMARIZE(FactClaim,FactClaim[ProductKey],"ResolvedIssueCount",[Resolvedissues]),[ResolvedIssueCount])
    YTDResolvedIssues:=TotalYTD([Rolling12IssuesResolved],DimDateR12[FiscalDate])
    -- Fiscal Date is <Fiscal Period>/1/<Fiscal year>
    Thanks,
    Sonal

  • Dynamic Date Range Filter - Rolling 15 Months

    Hello All,
    I'm having an issue with the below report filter:
    Date.Date >= (TIMESTAMPADD(SQL_TSI_MONTH, 0, CURRENT_DATE)) AND Date.Date <= (TIMESTAMPADD(SQL_TSI_MONTH, 14, CURRENT_DATE))
    The aim is for the above to return 15 months of data, today's date being 31/07/08 I would like all data to be returned from the 01/07/08 - 30/09/2009. The above filter however returns everything from the 31/07/2008 - 30/09/2008.
    I have seen similar posts but never but have not come across a solution, any ideas?
    Thanks
    Innoveer

    Ok.. Sorry guys, I found the post. For all who are interested:
    Date.Date >= TIMESTAMPADD(SQL_TSI_MONTH, 0, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)-1), CURRENT_DATE)) AND Date.Date <= TIMESTAMPADD(SQL_TSI_MONTH, 15, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)), CURRENT_DATE))

  • Rolling 12 months Actuals/Forecast

    I remember coming across an SAP How To PDF showing how to create a query where user inputs a specific period/month and dynamically all periods before the selected period populate with actuals and an perios /months remaining in the year will display forecast.  Again, this is dynamic depending on the period entered by the user and occurs on the same row.
    Can someone send me the link if you have it handy or if you know a solution, please share.

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Hi<br>
    Let us assume you are storing the value of Fiscal Period entered by User in Variable ZPER. Also let us say you use characteristic Value Type to identify if data is Actuals or Forecast with Value Type 10 being Actuals and 20 being Forecast.<br>
    Then create a Restricted Key Figure Actuals which is restricted to 3 things: Key Figure, Value Type and Fiscal Period. Restrict the Value Type to 10 and restrict Fiscal Period in that key figures to value less than or equal to Variable ZPER. Secondly create a Restricted Key Figure Forecast which is restricted to 3 things: Key Figure, Value Type and Fiscal Period. Restrict Value Type to 20 and restrict Fiscal Period in that key figures to value greater than Variable ZPER.<br>
    Please check if you get desired results.
    <br><br>
    Hope it helps.<br><br>
    Cheers Abhijit<br>
    </FONT><FONT FACE = "Verdana", Font Color = "Red">
    </FONT>

Maybe you are looking for

  • How can I pass the value of field OIA_BASELO to BAPI_GOODSMVT_CREATE_OIL?

    I can't find the corresponding fields to OIA_BASELO in any table parameters of the function. Can somebody help me?

  • Chunk read in FTP adapter

    Hi, I am working on JDev 11.1.1.3. I am using ftp adapter and im trying to use chuck read feature. On invoking the web service im facing the following error. Is any jars needs to be added for making this functionality to work in ftp adatper. Exceptio

  • Pie Chart displaying percentages

    Good Morning, I'm hoping someone has had experience creating a pie chart with percentage values and is wiling to offer some assistance because I've tried many ways and still came up short. The data table I'm using contains two columns: type (A, B, C,

  • Replacing WebDynpro for Java with Flex 3 Apps

    Hi there, I am new in developing Flex 3 app. I know how to use web Services with Flex and so on. But the my question how can I replace WebDynpro Apps in SAP NetWeaver portal. What do I have to do? How can I integrate Flex App in Portal without using

  • Query related to Siebel Data Bean - Business Object - Account - Update

    Hello, I am using Siebel Databean to update Business object - Account fields. I am using the field names displayed in browser to update the Account properties. But sometimes it fails with below error:- For e.g. Field 'Account Team' - Field 'AccountTe