Fiscal Month/Year Date Calculations

Hi Gurus,
I am trying to create a fiscal year and fiscal month offset using filter advanced SQL in answers. The “Offset” should allow to define a period of time + or – from a given starting point in order to report on a period of time. For example the Current Month Offset - When the variable is defined and set-up in the “Time” drop down menu in Answers. You would select Current Month Offset and in the create/edit filter dialog the Current Month Offset column contains a value of 0 for the most recent loaded month of data, a value of -1 for the month prior to that and so on. By selecting the “Operator”, “is between” and “Value” -5 and “Value” 0 you would filter to display the last 6 months.
I created the offset with calendar year using the Advanced filter and worked fine for if i need to change the year to what ever value
(((YEAR(CURDATE())-YEAR(Time.Date)) * 12) + (MONTH(CURDATE())-MONTH(Time.Date))) * -1 = -1
The issue comes when i create for Fiscal year and Fiscal month using filter advanced SQL it throws an error
(((FISCAL YEAR(CURDATE())-FISCALYEAR(Time.Date)) * 12) + (FISCAL MONTH(CURDATE())-FISCAL MONTH(Time.Date))) * -1 = -1
for fiscal year it throws an error below
Error getting drill information: SELECT Time."Fiscal Year" saw_0, Time."Fiscal Year" saw_1 FROM "AAFES Procurement - Purchase Orders" WHERE Time."Fiscal Year" = (((FISCAL YEAR(CURDATE())-FISCALYEAR(Time.Date)) * 12) + (FISCAL MONTH(CURDATE())-FISCAL MONTH(Time.Date))) * -1 = -1
Error Details
Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
Odbc driver returned an error (SQLExecDirectW).
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <CURDATE>: Syntax error [nQSError: 26012] . (HY000)
SQL Issued: {call NQSGetLevelDrillability('SELECT Time."Fiscal Year" saw_0, Time."Fiscal Year" saw_1 FROM "AAFES Procurement - Purchase Orders" WHERE Time."Fiscal Year" = (((FISCAL YEAR(CURDATE())-FISCALYEAR(Time.Date)) * 12) + (FISCAL MONTH(CURDATE())-FISCAL MONTH(Time.Date))) * -1 = -1')}
Thanks
Simmz

Hi,
Kindly refer the below link it may help you.
http://obieeelegant.blogspot.com/2011/06/obiee-date-expressions-reference.html
Thanks
Deva

Similar Messages

  • FM to get previous fiscal month/year and calendar month/year for a date.

    Hi All,
    I am having a requirement to extract some data based on either the previous fiscal month/year or the previous calendar month/year. There is no company code input to find the fiscal/calendar month/year.
    At selection screen, user can select either fiscal or calendar selection.
    Based on the selection, the data will be extracted.
    For the system date, we need to calculate previous fiscal month/year or previous calendar month/year and populate the calculated data back to the selection-screen.
    Can you one of you please suggest an FM to find previous fiscal month/year and previous calendar month/year.
    Thanks in Advance,
    Regards
    Gowthami

    Hi Gowthami,
    You can use following function module to calculate previous / next day or month or year.
       call function '/SAPHT/DRM_CALC_DATE'
          exporting
            date      = sy-datum
            days      =
            months    =
            sign      = '-'
            years     =
          importing
            calc_date = .
    Here, you can give '-' to sign, if you want previous day / month / year.
    Here, you can give '+' to sign, if you want next day / month / year.
    And depending upon your requirement, you can pass suitable value to days / month / year.
    e.g. To calcualte last month,
       call function '/SAPHT/DRM_CALC_DATE'
          exporting
            date      = sy-datum
            days      =
            months    = 1
            sign      = '-'
            years     =
          importing
            calc_date = wv_prev_month.
    so it will give '23-01-2008' . Then convert it in the required format as per your requirement using string function concatenate.
    Hope this help you.
    Regards,
    Anil

  • 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.

  • How to derive month/year from date in SAP BW 3.5 data flow

    Hi
    How we can derive cal year/month and fiscal month/year from date in SAP BW 3.5 data flow (we're using transfer and update rule)..
    Thanks,
    PK

    Hi,
    if you have any date filed in source side you can just map to any time char system will automatically convert to target objects.
    please look at the screen shot for understanding. (not 3.x it is 7.x)
    Thanks,
    Phani.

  • How to Include previous Month/Year in Transformation

    Hi,
    From Source System (DB Table;DB Connect)
    Location_ID,EMP_ID,AMOUNT
    There is no date field avaliable in the source system.
    The Data load to BW will me Monthly frequency...I,e:Data will be loaded once in a Months on 1st of every month.
    My requirment is to Include a date field in BW transformations which input previous month/year data for every record
    How can i do that and wether do i need to write a start or field routine in transformations
    Code please
    Thanks

    Hi Pal,
    You could use the following code to achieve this:
    DATA: v_calmonth(6) TYPE c,
          v_month(2) TYPE c,
          v_year(4) TYPE c.
    v_month = sy-datum+4(2).
    v_year = sy-datum+0(4).
    IF v_month = 1.
      v_year = v_year - 1.
    ENDIF.
    IF v_month = 1.
      v_month = 12.
    ELSE.
      v_month = v_month - 1.
    ENDIF.
    CONCATENATE v_year v_month INTO result.
    Hope this helps.
    Thanks and Regards
    Subray Hegde

  • Date Calculations - Adding 1 to the day and adjusting month/year

    Hi all,
    I have a date field in MM/ DD/ YYYY format. If I add 1 to the DD (day) field, and I hit the end
    of the month/year I need to adjust the MM and YYYY accordingly.
    Is there is an existing class/method in the JAVA API that would handle somthing like this??
    If so , I can't find it..... I don't want to re-invent the wheel creating a Date Handling routine just
    for this program.......
    Thanks very much

    This is overkill... (and sorry that this post is over a year later than the original post... hopefully somebody will benefit from it :)
    Calendar.getInstance() by default instanciates a GregorianCalendar
    object. (check the src).
    Therefore:
    Calendar cal = Calendar.getInstance();
    cal.setTime(d); // where d = java.util.Date or java.sql.Timestamp
    cal.add(Calendar.DATE, numberOfDays);
    return cal.getTime();
    public static java.util.Date
    adjustDateBy(java.util.Date d, int numberOfDays) {
    java.util.GregorianCalendar cal = new
    java.util.GregorianCalendar();
         cal.setTime(d);
    cal.add(java.util.GregorianCalendar.DATE,
    numberOfDays);
         return cal.getTime();

  • Month Year values based on Posting Date

    In my super huge extra large InfoCube (0CFM_C10) I got a lot of data. I take Posting Date, some KFG and CalMonth/Year. Unfortinally CalMonth/Year duplicates records, if I drop it off the columns/rows I get valid data by Posting Date.
    My question is this - is it possible to create some MonthYear Calculated KFG/field/formula or smthng. based on Posting Date? In other words I need Month/Year in rows/ columns or free characteristics...
    Edited by: Gediminas Berzanskis on Mar 18, 2008 10:18 AM

    Dear,
    When canceling a payment which was created in previous posting periods,
    we  get system message "Date deviates from permissible range",so
    the workaround is changing back the posting period to the previous one
    and try to cancel the payment.
    However,another system message pops up when we try to cancel payment
    after changing back the posting period,which is the "creation date" or
    "posting date".
    In this scenario, you should select the second option from the
    cancellation options window, which is the 'Creation date'. I would like
    to explain more below.
    Posting Date- means the posting date of the cancellation document, it's
    not the posting date of the incoming payment that you wanna perform the
    cancellation. In your case, selecting this 'posting date' option, system
    deems that you want to post this cancellation document on its own
    posting date.
    Creating Date- means the posting date/creation date of the incoming
    payment, it makes sense that the system works fine if you select this
    option. If you cancel the incoming payment and check the JE generated,
    you will find that the posting date of this cancellation document is
    actually recorded as the posting date of the incoming payment.
    Wish it helps you.If you have any problems,please kindly let me know.
    Thanks and best regards,
    Apple

  • Fiscal Calendar in Report Variant Dynamic Date Calculation

    We are switching from the standard calendar to a 4/4/5 calendar for our fiscal calendar. We have a number of batch reports that use dynamic date calculation in the variant to get Month-To-Date or Previous Month date ranges. Is there a way to convert these variants to use the new FiScal calendar instead of the regular calendar?

    thanks to answer , praveen.
    I know, VARI has name of FM , but not has Calendar ID.

  • CAML Query to get Items based on Year and Month From Date Column

    Hi All,
           * As we knew that there are default columns in calendar like Stattdate,Title,Location..etc.
            * I required the CAML Query to get the list items of calender of particular Month and Year,So that I can get number of items or evetns are in Calendar
    Can any one help me how can I do this using caml query
    Samar

    Hi Stuart,
                 Thanks for your response,I had chosen 2nd option of our above mention suggestion.But when I try to fetech the data from a calendar it is showing below error .I
    had checked the below code with oter lists by changing Type to text and it worked fine.Can you please help me how can I fetech for the calulated columns
    Error
    "One or more field
    types are not installed properly. Go to the list settings page to delete these
    fields. "
    Code:
     string year="2014";
                string month="February";
                SPSite mysite = SPContext.Current.Site;
                SPWeb myweb = mysite.OpenWeb();
                try
                    SPList mylist = myweb.Lists["Calendar"];
                    SPQuery myquery = new SPQuery();
                    myquery.Query = @"<Where>
                                          <And>
                                           <Eq>
                                             <FieldRef Name='Year'/>
                                             <Value Type='Calculated'>"
    + year + @"</Value>
                                          </Eq>
                                          <Eq>
                                             <FieldRef Name='Month'
    />
                                             <Value Type='Calculated'>"
    + month + @"</Value>
                                          </Eq>
                                         </And>
                                      </Where>";
                    SPListItemCollection totaltiems = mylist.GetItems(myquery);
                   Label1.Text= "Total Number of Items is "+" "+totaltiems.Count.ToString();
                catch (Exception ee)
                    Label1.Text = ee.Message;
                finally
                    myweb.Dispose();
    Calculated Columns
    Samar

  • Routine to convert the date into month/year

    Hi friends,
    I have requirement like I have 0billdate, but i want only month and year in that.  So i have created a z object  for that taking reference as 0calmonth.  I think the format is yyyymm.
    So now I want to write a routine which converts the date to month/year.  If anybody know this please let me know.
    Regards
    San Reddy

    Hi
    in the trnasfer rule or in the update rule select the Zinfo object to which you need to do conversion
    in details select formula and create.
    Select all functions and follow the steps below.
    use the conversion function DATE_MONTH( )
    Short Text
    Function: Date -> Month
    Functionality
    Calculates the month from a specified date.
    Requirements
    The date must appear in the format yyyymmdd.
    Parameters
    DATE_MONTH (date)
    Result
    The result is calculated in the format yyyymm.
    Regards
    RaM

  • Query for fiscal month till current month of year

    Hi,
    can you please help me to show only fiscal months till current month of year?
    e.g. Current month is Apr of 2012.
    I have to show the fiscal months till the Apr 2012 of year 2012.
    if the date is 24th of Apr then it would show May month also.
    Regards,
    Nilesh

    with t as (
    select to_date('04232012','MMDDYYYY') d from dual union all
    select to_date('04252012','MMDDYYYY') from dual)
    select
    d,
    case
    when to_char(d,'DD') >= 24 then
    to_char(trunc(add_months(d,1),'MONTH'),'MM-YYYY')
    else
    to_char(d,'MM-YYYY')
    end fin_month
    from t
    D     FIN_MONTH
    23.04.2012     04-2012
    25.04.2012     05-2012

  • Nested Loops...looping through one month of data at a time year by year

    Hi all,
    I'm trying to create an insert statement that loops through a table that has 10 years of data (2001 to 2010) month by month to minimize impact on server and commits more frequently to avoid filling up the redo logs and rollback tablespaces. The table is large, has about 40 millions records per year. Lets say the structure of the table is the following:
    Customer_ID number(9),
    Order_Item_1 number(6),
    Order_Item_2 number(6),
    Order_Item_3 number(6),
    Order_date date
    The table is in flat format but I want to normalize it so that it looks like the following:
    Customer_ID Order_Seq Order_Item Order_date
    999999999 1 555555 01-jan-2001
    999999999 2 666666 01-jan-2001
    999999999 3 444444 01-jan-2001
    888888888 1 555555 03-jan-2001
    888888888 2 666666 03-jan-2001
    But because I want to loop through month by month....I need to set it up so that it loops through month by month, year by year (Using the Order Date Field) and Order_item by Order_item. Something like:
    so my insert statements would be something like if I hardcoded instead of put the insert statement into a loop:
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,1,Order_item,Order_date where Order_item_1 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='01';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,2,Order_item,Order_date where Order_item_2 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='01';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,3,Order_item,Order_date where Order_item_3 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='01';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,1,Order_item,Order_date where Order_item_1 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='02';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,2,Order_item,Order_date where Order_item_2 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='02';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,3,Order_item,Order_date where Order_item_3 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='03';
    Hope this makes sense.
    Thanks

    Does the sequence of items in an order really matter? In other words, do we really need to preserve that an item was in position 2 versus position 1? I bet that the sequence or position of each item in an order is not meaningful. They were probably numbered 1, 2, and 3 just to make them uniquely named columns so there would be three slots to hold up to 3 items in the denormalized table.
    You only have about 400 million rows to insert, so it could feasibly be done in a single transaction (depending on your database environment).
    You can always do a create table as select (CTAS) to help with undo / redo issues and get better performance. You could run it in parallel, and spit it out to a new table partitioned by month. Single DDL statement running in parallel making your new table--sounds good to me.
    How about something like this:
    CREATE TABLE ORDERS_NORMALIZED
    (CUSTOMER_ID, ORDER_ITEM, ORDER_DATE)
    PARTITION BY RANGE(ORDER_DATE)
    PARTITION p200901 VALUES LESS THAN (TO_DATE('200902','YYYYMM')),
    PARTITION p200902 VALUES LESS THAN (TO_DATE('200903','YYYYMM')),
    PARTITION p201012 VALUES LESS THAN (TO_DATE('201101','YYYYMM'))
    as SELECT CUSTOMER_ID, ORDER_ITEM_1, ORDER_DATE
       FROM OTHER_TABLE
       WHERE ORDER_ITEM_1 IS NOT NULL
       UNION ALL
       SELECT CUSTOMER_ID, ORDER_ITEM_2, ORDER_DATE
       FROM OTHER_TABLE
       WHERE ORDER_ITEM_2 IS NOT NULL
       UNION ALL
       SELECT CUSTOMER_ID, ORDER_ITEM_3, ORDER_DATE
       FROM OTHER_TABLE
       WHERE ORDER_ITEM_3 IS NOT NULL.....................
    Out of curiosity, why not normalize it further? You could have used two tables instead of one.
    One (ORDER) with:
    ORDER_ID
    CUSTOMER_ID
    DATE
    Order_id would be a new surrogate key / primary key.
    Another table (ORDER_ITEM) with:
    ORDER_ID
    ORDER_ITEM
    It would be a table that links ORDERS to ITEMS. You get the idea.

  • Can't Delete Data in One Month in a calculated currency EPM 10 NW

    Good Morning,
    I have an issue with data in my system. We are having issues deleting data from our calculated currencies for the month of January. We load our data to LC and then run currency conversion to populate our USD, CAD, etc report currencies. We run a nightly compression on the data. We needed to adjust some numbers in LC and run currency conversion. When I ran the currency conversion the data in the calculated currencies did not update with the new LC balances. So I tried to delete the data in the calculated currencies and then re run currency conversion for the time period. But when I tried to run the Data Manager Package it did not clear the data. It gives a succeeded message but when you look at the Package Log it shows 0 records cleared. I then tried to upload zero's to the same data intersections and it did not work either. I got a success message but the data did not delete. I have had my BI guys check the back end lock tables and nothing is locked. We don't use work status so there are not any work status locks on that month of data. I don't think it is the Data Manager package becuase I can run the same DM package on any other time period and it works. If anyone has any ideas of things that could be causing this I would really appreciate it.

    I am attaching the FX Conversion Code to this message as well as attaching it. If you have any suggestions I would greatly appreciate it.
    Here is the BADI logic from the FX Conversion BADI
    method if_uj_custom_logic~execute.
      " this badi would be called from finance model as well finance_des model
      data: lt_acct_type_attr type zbpc_t_acct_type_attr,
            lt_pc_currency type zbpc_t_pc_curr.
      get_parameters( exporting it_param = it_param ).
      " category can only be a single base member
      if check_category( ) <> 'X'.
        insert_error_log( ).
        raise exception type cx_uj_custom_logic .
      endif.
      lt_acct_type_attr = get_account_attr( ).
      lt_pc_currency = get_pc_currency( ).
      read_rates_cube( ).
      " gv_app_id is initialized in the init method.
      case gv_app_id.
        when 'FINANCE'.
          process_fxconv_4_finance( exporting it_acct_type_attr = lt_acct_type_attr it_pc_currency = lt_pc_currency ).
          add_plug_4_finance( exporting it_pc_currency = lt_pc_currency  ).
        when 'FINANCE_DES'.
          process_fxconv_4_finance_des( exporting it_acct_type_attr = lt_acct_type_attr it_pc_currency = lt_pc_currency ).
    *      add_plug_4_finance_des( exporting it_pc_currency = lt_pc_currency ).
      endcase.
    *  write_2_cube( ).
    endmethod.

  • Date for Month year only?

    I Have a report being done where, the user wants to see the 'slow moving inventory' for a 2 month period.
    It's not automatic, the past 2 months. they can select which 2 months they want. So, I was thinking of the best way for the parameters.
    Maybe just have them enter one? month/year. but in any case if i do a from and to, I dont' need the entire calender- is there  a way to display just the month and year? if not i can create the parameter that way.

    I would create a command (SQL Select statement) to use for data for a dynamic prompt.  It might look something like this in Oracle (allows for two full calendar years in the past):
    Select distinct
    To_Char(OrderDate, 'MMM-YYYY')  as MonthYear
    from Orders
    where EXTRACT(Year from OrderDate) >= (EXTRACT(Year from Sysdate) - 2)
    Or like this in SQL Server:
    Select distinct
    Left(DateName(month, OrderDate), 3) + '-' + DateName(year, OrderDate) as MonthYear
    from Orders
    where Year(OrderDate) >= (Year(GetDate()) - 2)
    DO NOT link the command to anything in the report - its sole purpose is to provide data for a dynamic prompt.  Crystal will complain that this is generally not supported, but it will work in this situation.
    Now create a dynamic parameter that will use this data - DO NOT use any other data from your report tables!  This parameter will identify the start month for the report.
    Lastly, you'll need to create a two formulas - one that will calculate the start date from the parameter value and another that will create the end date.  If the parameter is called {?StartMonth}, they might look like this:
    {@StartDate}
    StringVar monthName := UpperCase(Left({?StartMonth}, 3));
    //get the month number
    NumberVar mn := Switch (
      monthName = 'JAN', 1,
      monthName = 'FEB', 2,
      monthName = 'DEC', 12);
    //get the Year number
    NumberVar yr := ToNumber(Right({?StartMonth}, 4));
    //return the first day of the start month:
    Date(yr, mn, 1)
    {@EndDate}
    //Subtract one day from the start of the month 2 months after the start date to get the end of the
    //month after the start date
    DateAdd('m', 2, {@StartDate})  -  1 
    Use these formulas in your selection criteria for your report.
    -Dell

  • Month to Date and Year to Date Scenarios

    <b>Dear SAP BI Gurus,
    Can anyone please give me guidance how to create a Month to Date and Year To Date Scenarios (Variables perhaps?) for 0SRR_CF_C1?  The date is in decimal and not DATE format…  I’m assuming the reason for this is to get the Time variance….  Nonetheless, I’d like to create a MTD and YTD scenario for reporting.
    Much Thanks
    Philips Manalaysay</b>

    Hi,
    You should take a look at the blog and doc below.
    /people/vikash.agrawal/blog/2006/10/17/enable-trend-reporting-150-by-manipulating-variable-value
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Regards,

Maybe you are looking for

  • ICal synching across multiple user accounts

    I recently set up 2 user accounts on my first iMac, one for me and one for my husband. We would like to maintain separate calendars and just e-mail common appointments back and forth. But we find that adding an appointment on one iCal calendar actual

  • How can I find whoelse is using my internet if I have an IP adress?

    My internet isn't working. The message IP-konfiguration shows up and says that the adress is un use by another adress. How can I find that adress or what do I do to make my internet work again?

  • ERROR [BF00] while using Test Data Service

    Hi, I am new to VC. I am using  SAP Netweaver Visual Composer, Client version 700.14.0.1. When i test a Data Service "BAPI_BANK_GETDETAIL" using the following values:        Bankcountry: US     Bankkey: 12345678 or 021000089 It doesn't retrieve value

  • LOGIC CRASHES ALL THE TIME

    HELP!!! Is it possible I over loaded with plug-ins? I layered one track with four of the same baseline? If this is the case why did it work before I rebooted and why are other sessions suddenly also crashing... HELP!!!! I googled and googled and I am

  • Forms and SAP BI Launch pad

    Hi All, I apologize in advance if this is the wrong place, but this crosses 2 paths. PDf Forms and SAP BI Launch Pad I have a PDF Form created in Adobe LiveCycle and I wanted to add it to the CMC so users of the Launch Pad could all have access in on