Rolling Quarter

Hi,
I have a situation where I have to group the data based on rolling quarter.
My sample data in the dim_time table is as follows:
DATE_ID     CAL_DATE     YEAR     QUARTER     MONTH     MONTH_FULL     WEEK_OF_YEAR     DAY_OF_WEEK     CR_DATE
19050418     18-APR-05     1905     2     4     April     16     Tuesday     13-SEP-12
19050419     19-APR-05     1905     2     4     April     16     Wednesday     13-SEP-12
19050420     20-APR-05     1905     2     4     April     16     Thursday     13-SEP-12
19050421     21-APR-05     1905     2     4     April     16     Friday     13-SEP-12
User enter the last date(say 15th Sep 2012) and the number of quarters he wants to see...say 2.
The output will be grouped by previous two quarters starting with 15th Sep.
i.e. Q1:1st Sep -15th Sep Q2:1st Jun -30th Jun
1st Aug - 31st Aug 1st May - 31st May
1st July - 31st July 1st Apr - 30th Apr
Please suggest how to achieve this.
Best Regards,
sud

Trinity317 wrote:
Please suggest your thoughts in this.
Mark your previous post as answered if it is solved.
Please read SQL and PL/SQL FAQ
In the previous post and in this post you haven't posted create table and insert statements. If you don't mind doing it will be easier to get help.
Additionally when you put some code or output please enclose it between two lines starting with {noformat}{noformat}
i.e.:
{noformat}{noformat}
SELECT ...
{noformat}{noformat}
Regards.
Al
Edited by: Alberto Faenza on Dec 5, 2012 5:02 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Year to date, rolling quarter measures

    I need to implement reports with year to date, rolling quarter (current month + 2 previous month) measures, etc...
    The BO universe is connected to a bex query on a SAP multi provider
    Where do you recommend to implement such measures?
    Should we precalculate them in a SAP BI keyfigure ?
    Should we create a restricted key figures in the bex query and using SAP variable with customer exits to implement for example the rolling quarter functionnality?
    Should be we create a new measure in the BO universe?
    Should we create a new variable in the report. In this case what is the impact on the performance?
    We have about 30.000 records in our cube for about 3 years of data. the volume will grow on a monthly basis but analysis will mainly be done on maximum three years of data.

    Hi,
    this is not related to performance. this is related to the simple fact that the MDX on SAP BW does not have support for something like a Today() or a Now(), which means you can't have rolling months based on the system date.
    if you use an EXIT variable you have the keyfigures in the universe and can leverage it in the Web Intelligence report.
    ingo

  • Quarter to Date

    Hi All,
       I have a requirement in FIGL to do a 'Quarter to Date' on KeyFigures . Suppose if the user is running report for posting period = June ,he has to see the KF rolled from start of that Quarter(April to June).This is pretty much similar to YTD requirement. In YTD we define (January to Posting period variable).
        I was wondering how Quarter to Date could be achieved without a CMOD exit. Please post your thoughts.
    Thanks
    BIBOBJ

    Hi Pavan,
       Creating an Offset will give us a rolling quarter. My requirement is to do a Quarter to Date .
    For Ex:
    Variable input :  Feb2009
    KF output : Jan and Feb 2009 only
    I think creating an offset(-2) would give data for Dec2008,Jan2009 and Feb2009.
    Pls let me know how could we achieve this.
    BIBOBJ

  • Unable to restrict a rolling char field in MDX Universe.

    Hello!
    I am trying to create a restricted Characteristic in a SAP BW OLAP Universe. The chararcteristic is a Quarter field and has to be restricted for some reports to not display the last quarter in a rolling quarter period.There are a few menthods I followed inorder to achieve this, which are as below:
    1) Object - SELECT CLAUSE : <EXPRESSION>EXCEPT( [0CALQTR].[LEVEL01],[0CALQTR].[LEVEL01].CurrentMember.LastSibling)</EXPRESSION>. This gives and error messsage that the MDX expression is not valid.
    2) Object - WHERE CLAUSE : <EXPRESSION>EXCEPT( [0CALQTR].[LEVEL01],[0CALQTR].[LEVEL01].CurrentMember.LastSibling)</EXPRESSION>. This gives and error messsage that the MDX expression is not valid.
    3) Pre-Defined Filter -
    <FILTER KEY="[0CALQTR].[LEVEL01]">
    <CONDITION
    OPERATORCONDITION="NotEqual">
    <CONSTANT CAPTION="[0CALQTR].[LEVEL01].CurrentMember.LastSibling"/>
    </CONDITION>
    </FILTER>. This also does not work giving a MDX statement not valid error message.
    However, the only thing that works in all of the above the is the predefined filter with the following expressions:
    <FILTER KEY="@Select(Fisc. Year/Quarter\L01 Fisc. Year/Quarter)">
    <CONDITION
    OPERATORCONDITION="NotEqual">
    <CONSTANT CAPTION="@Prompt('L01
    Quarter','A','L01 Fisc. Year/Quarter',mono,constrained)"/>
    </CONDITION>
    </FILTER>.
    Kindly suggest if I can avoid using the prompt and just restrict the Quarter characteristic (with rolling quarters) to avoid displaying the last quarter.
    Any inputs are highly appreciated.
    Thanks,
    Vivek.

    Hi,
    I believe you have to explicitly include a validate activity...
    http://docs.oracle.com/cd/E25054_01/dev.1111/e10224/bp_appx_ref.htm#BABJDHEH
    Cheers,
    Vlad

  • Advance Options in Web APP Designer

    Hi,
      Although we have BI for NW04S , we are still using Web APP designer3.5. Using the Drop down box we can have a dropdown based on  a info object ( for example if the report has a charateristics/info object "0CALQUARTER", I can easily build a dropdown which can show all the quarter that the infoprovider has and then user can select that perticular Quaerter or All Querter( or with another drop down for Year). This combination allows the user to see the data for a perticluar( or for all year) and for a perticular quater( or for all quarter in that Year, selected in previous dropdown). What I really want to do a rolling quarter( for example ( would like to show the data based the current and previous 3 quarter based on a drop down, or only current quarter etc).. One way to do this is to have the report using variables replaced by user exit. Is there any other way directly in the web app desiner?
    Thanks
    Arun

    If you are talking about different screens for the associated reports - you could have a user entry variable for quarter and the value for the same can be passed through the URL and you can use the required offsets in the query design..
    Arun

  • MDX for OLAP Universe.

    Hello!
    I have a scenario wherein I have to create a custom dimension restricting some values to be displayed. The dimension I am trying to restrict here is Quarter - [ZCALQRT].[LEVEL01], which has values like Q3 2011, Q4 2011, Q1 2012,Q2 2012 on a rolling quarter basis. My requirement is to restrict the last quarter to be displayed.  I have tried the following menthods to achieve this:
    1) Create a new dimension object with the following syntax:
    <EXPRESSION>
    WITH MEMBER [Measures].[Delta] ASu2019
    [Measures].[4J68GNRER52B7BV68B1GHWUA8]-[Measures].[4J68GNC1P7UW62S9WMWRXSWUO]u2019
    SELECT
    {[Measures].[4J68GNC1P7UW62S9WMWRXSWUO],[Measures].[4J68GNRER52B7BV68B1GHWUA8], [Measures].[Delta]} ON COLUMNS,
    NON EMPTY {[ZCALQRT].[LEVEL01].members} ON ROWS
    FROM [$Y_ZAPOH]
    WHERE (EXCEPT([ZCALQRT].[LEVEL01].[[2ZCALQRT]].[Value],[ZCALQRT].[LEVEL01].[[2ZCALQRT]].[Value].CurrentMember.LastSibling))
    </EXPRESSION>
    So, here I tried to restrict the dimension in the where clause using the EXCEPT(,) function. But on using this new custom dimension in Web I the error message I receive is "Some objects are not available in the Universe".
    2) Create a restriction for the object in the where clause:
    <EXPRESSION> (EXCEPT([ZCALQRT].[LEVEL01].[[2ZCALQRT]].[Value],[ZCALQRT].[LEVEL01].[[2ZCALQRT]].[Value].CurrentMember.LastSibling))</EXPRESSION>
    This gives and error message with MDX syntax being invalid.
    Can anyone please suggest a work around for restricting the dimension in the SELECT/ WHERE clause or a PRE-DEFINED FILTER.
    Any inputs are highly appreciated.
    Thanks,
    Vivek.

    Hi Ingo,
    Thank you for the information. I will try doing that in the SAP BEx query end. However, I found some examples with the MDX which can filter the members based on their levels. One specific example of referring to a member is as follows:
    If I need to exclude the last value in a rolling value set, I tried to use the EXCEPT(,) function and referring the member in a predefined filter:
    <EXPRESSION>EXCEPT([0CALQTR].[LEVEL01],[0CALQTR],[LEVEL01].CurrentMember.LastSibling)</EXPRESSION>
    Can you please suggest if anything is wrong with this MDX statement?
    Any inputs are highly appreciated.
    Thanks,
    Vivek.

  • Bi 7.0 SD report for previous year, month, current month, rolling 30days.

    I have Sales document type in rows and in column, I have no of sales documents.
    Now, I need sales documents in rows and no of sales documents in columns according to
    created on date: 0calday of types as follows
    List of columns:
    Previous year    last quarter   Current quarter     Current month    30 days rolling.
    How do I define these RKFs.. do we have standard date variables for RKF.
    Thanks
    Jeff

    Hi ,
    You dont have a standard date variable
    I have the solution for ur problem
    here u can go for creation of variable for column KF and assign the value for each sales document type = 1 by using a customer exit
    Pls assign some points if answer is helpfull
    Regards ,
    Subash Balakrishnan

  • Group and drill down and roll up by the most recent SCD2 type member in reporting period in SSAS

    Hello,
    I am new to SSAS and cube world so my problem might not be big of a challenge for you but it is for me.
    Here is my challenge :
    My simplified datamart relation star schema model looks like this (2 dimensions and one fact):
    DATE dimension - Date_Id, Date, Fiscal_Year, Fiscal_Quearter, Fiscal_Month, Calendar_Month, etc
     CLIENT dimension – Cient_SK, Client_Id, and two  SCD2 type fields : Status,and Class and, of course, Start_Date, End_Date to keep track of SCD2 along with a Current_Flag . I can have several records for the same Client_Id
    over a given reporting  period.
    FACT – Date_ID, Client_SK, Client_Id
    Fact table is daily snapshot that loads one record per client only if a client was active on that day.
    Requirement: 
    Count number of currently active clients group by  “Status” or “Class” with option to roll-up to the total count of clients
    Count total number of clients who were active in the specific reporting period (period can be fiscal year or fiscal quarter or a month) grouped by the most recent “Label” or most recent “Status” or most recent “Class” in that reporting period.
    I created a cube and created a measure “Distinct_Count” that does just that - distinct count on Client_Id. It works just fine for current date as well as for any given reporting period and I have nice rolling-up/down thru Fiscal_Year-Fiscal_Quarter- Month.
    But I am having problem grouping by any of 3 attributes with SCD2 type in CLIENT dimension. I do not know how to get the latest active value (member) in the reporting period
    Here is my CLIENT dimension:
    Client_SK
    Client_Id
    Status
    Class
    Start_Date
    End_Date
    Current_Flag
    14
    78
    fair
    B
    03/01/2008
    27/09/2012
    0
    73
    78
    very good
    C
    28/09/2012
    15/08/2013
    0
    89
    78
    Bad
    B
    16/08/2013
    24/09/2013
    0
    95
    78
    Good
    B
    25/09/2013
    03/10/2013
    0
    97
    78
    Good
    A
    04/10/2013
    01/12/2013
    0
    102
    78
    Average
    A
    02/12/2013
    31/12/2099
    1
    For example:
    If selected reporting period is  Fiscal_Quarter is Q2 that covers period Aug-Sep-Oct (Client_SK: 89, 95, 97) and if my client was active in that period, when I group active client’s count by “Status”
     attribute I need to count this client in the group “Good” since that was the most recent value for this client in this period (Q2) for this attribute (Status).
    I do not know if this is important but just in case: user interface  could be Excel application or any MDX enabled Microsoft or third party visualisation tool.
    Thanks in advance

    Hello Bob,
    Thank you for your question. I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Regards,
    Elvis Long
    TechNet Community Support

  • Time Dimension Roll-Up Not Working

    Hi Gurus,
    We are on BPC NW 7.0 SP04. We are experiencing a strange problem with Time dimension. Even after defining the hierarchy correctly, the values are not being rolled up the hierarchy. Our requirement is to capture data at quarter level and year level. So we have defined the time dimension in following manner:
    ID                     EVDESCRIPTION   PARENTH1     LEVEL         YEAR   PERIOD  STYLE   MONTHNUM    TYPE   TIMEID           HLEVEL
    2007.TOTAL     2007 TOTAL                               YEAR             2007     TOTAL   T3                12                       ACT   20070005        1
    2007             2007                   2007.TOTAL   QUARTER     2007     Q1        T2                13                       ACT                        2
    2007.Q1             2007 Q1                   2007.TOTAL   QUARTER     2007     Q1        T1                  3                       ACT   20070001        2
    2007.Q2             2007 Q2                   2007.TOTAL   QUARTER     2007     Q2        T1                  6                       ACT   20070002        2
    2007.Q3             2007 Q3                   2007.TOTAL   QUARTER     2007     Q3        T1                  9                       ACT   20070003        2
    2007.Q4             2007 Q4                   2007.TOTAL   QUARTER     2007     Q4        T1                12                       ACT   20070004        2
    Here TYPE is a custom dimension property . As the members depict, 2007.TOTAL value should be calculated as the sum of 2007.Q1, 2007.Q2, 2007.Q3 and 2007.Q4 (Quarters and Years are mutually exclusive in our case). But when we maintain data for Q1,Q2,Q3 and Q4, the TOTAL value is displayed as the value of Q4, and not the sum of quarters. We have tried changing MEASURES from PERIODIC to QTD and YTD, with no effect. We thought that it could be a problem with BI, and so built a simple BeX Query on top of the BPC application cube. But in the BEX query, the time dimension is properly aggregated, nd values are displayed correctly. So apparently it is not a problem with BI. In that case, we are missing something in BPC itself. Can any of you identify what it could be? Awaiting answers and Thanking in Advance.
    Sincere Regards,
    Amitabha

    Amitabha,
    It's just a problem that a lot of people run into when they are getting used to BPC. Once you see it happen to 10 or 15 people, you can start to recognize it pretty quickly
    There are not a lot of examples of this in the Netweaver documentation. I think there are more in the Microsoft docs. However, there is mention of it on this page in the Netweaver documentation: [http://help.sap.com/saphelp_bpc75_nw/helpdata/en/65/84d6596224477d80cc8a4392e4c114/frameset.htm]
    Ethan

  • Quarter Calculation

    Hi All,
    My requirement is i have to display last 6 quarters sales for each model like
    Model ---Sales QTD---Sales Q1----Sales Q2----Sales Q3----Sales Q4----Sales Q5----Sales Q6
    LG ----- 123 ----------435----------432-----------446-----------456----------654--------------564
    I had created time dimension as Quarter and created logical columns using ago function.
    if i run the report today it is working fine with QTD and i am not getting any data for Q1, Q2 etc..
    If i keep report date as 12/24/2010 the i am getting only up to Q4 data . i am not getting any data for Q5 and Q6 because Quarter is calculating with Year so always it will take only 4 quarters data.
    like
    2010 Q1
    2010 Q2
    2010 Q3
    2010 Q4
    2011 Q1
    2011 Q2
    How can i can get all last 6 Quarters data? please help me.
    Thanks in advance for your help.

    Thanks deep for your response. but i am not looking for rolling data. i want create logical columns in BMM layer using AGO function for Q1 to Q6. i can do up to Q4 becuase on eyear can have only 4 Quarters.
    How can i get count for Q5 and Q6 .
    i really appreciated for your help.

  • Quarter Level Calculations

    Hi All,
    I am trying to write quarter level calculations but my base period is months. But i am not getting calculation option at the quarter level.
    Thankx in advance
    Edited by: user9174018 on Mar 11, 2010 2:02 AM

    If the calculation is done for specific accounts. You need to make those account as dynamic calc and write the calculation logic in the sub dynamic() sub routine. The value will be computed at the quarter level automatically. This is generally done for the ratio accounts which cannot be rolled up to the Parent period.
    Varun

  • OBIEE 10g Amounts not rolling up

    Dear All,
    I am facing an issue in rolling up myamount  totals.
    I need to create a calculated column in RPD based on another fact column.(Amount2 is the calulated item that I have created)
    Amount1 - my existing fact column
    Amount2 - my new calculated column created at logical level.
    My results :
      Below report is at Quarter level. The totals displayed for Amount2 are wrong. The total displayed is same as that of Amount1 total
    Table
    Rgn
    Quarter
    Amount 1
    Amount2
    R1
    1
    24,578,396.33
    24,578,396.33
    2
    96,133,672.22
    96,133,672.22
    3
    42,639,566.27
    25,954,518.60
    4
    58,333,616.34
    0.00
    Grand Total
    221,685,251.16
    221,685,251.16
            and when i roll up at year level the amount 2 does not roll up to the correct  total and display only 0
    Table
    Rgn
    Amount1
    Amount2
    R1
    221,685,251.16
    0.00
    Grand Total
    221,685,251.16
    0.00
    Can you please help me, where I have  gone wrong.
    Areas where i can cross check, if I have missed any step.
    Appreciate your help.
    Thanks in advance.
    Achala

    Thank you for the reply.
    This is the formula used for Amount 2:
    CASE  WHEN TST."Dim-Time"."Quarter" = 1 AND  MOD( EXTRACT( YEAR  FROM  CURRENT_DATE ), 4) = 0 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 1 =  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN TST."Fact-Q1" *  EXTRACT( DAY_OF_QUARTER  FROM  CURRENT_DATE ) / 91
    WHEN TST."Dim-Time"."Quarter" = 1 AND  MOD( EXTRACT( YEAR  FROM  CURRENT_DATE ), 4) <> 0 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 1 =  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN TST."Fact-Q1" *  EXTRACT( DAY_OF_QUARTER  FROM  CURRENT_DATE ) / 90
    WHEN TST."Dim-Time"."Quarter" = 2 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 2 =  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN TST."Fact-Q2" *  EXTRACT( DAY_OF_QUARTER  FROM  CURRENT_DATE ) / 91
    WHEN TST."Dim-Time"."Quarter" = 3 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 3 =  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN TST."Fact-Q3" *  EXTRACT( DAY_OF_QUARTER  FROM  CURRENT_DATE ) / 92
    WHEN TST."Dim-Time"."Quarter" = 4 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 4 =  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE ) THEN TST."Fact-Q4" *  EXTRACT( DAY_OF_QUARTER  FROM  CURRENT_DATE ) / 92
    WHEN TST."Dim-Time"."Quarter" = 1 AND  MOD( EXTRACT( YEAR  FROM  CURRENT_DATE ), 4) = 0 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 1 <  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN TST."Fact-Total_Amount" WHEN TST."Dim-Time"."Quarter" = 1 AND  MOD( EXTRACT( YEAR  FROM  CURRENT_DATE ), 4) <> 0 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 1 <  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN TST."Fact-Total_Amount" WHEN TST."Dim-Time"."Quarter" = 2 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 2 <  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN TST."Fact-Total_Amount" WHEN TST."Dim-Time"."Quarter" = 3 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 3 <  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN TST."Fact-Total_Amount" WHEN TST."Dim-Time"."Quarter" = 4 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 4 <  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN TST."Fact-Total_Amount" WHEN TST."Dim-Time"."Quarter" = 1 AND  MOD( EXTRACT( YEAR  FROM  CURRENT_DATE ), 4) = 0 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 1 >  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN 0 WHEN TST."Dim-Time"."Quarter" = 1 AND  MOD( EXTRACT( YEAR  FROM  CURRENT_DATE ), 4) <> 0 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 1 >  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN 0 WHEN TST."Dim-Time"."Quarter" = 2 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 2 >  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN 0 WHEN TST."Dim-Time"."Quarter" = 3 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 3 >  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE )
    THEN 0 WHEN TST."Dim-Time"."Quarter" = 4 AND  EXTRACT( YEAR  FROM  CURRENT_DATE ) = TST."Dim-Time"."Year" AND 4 >  EXTRACT( QUARTER_OF_YEAR  FROM  CURRENT_DATE ) THEN 0 ELSE TST."Fact-Total_Amount" END
    In the above formula:
    TST."Fact-Total_Amount" is an aggregated to sum logical column, similarly TST."Fact-Q1", TST."Fact-Q2", TST."Fact-Q3", TST."Fact-Q4" are also aggregated to sum logical columns.
    Please let me know your findings.
    Many Thanks,
    Kind Regards,
    Achala

  • Next quarter to the selected quarter

    Hi Experts,
    Our requirement is to show the data in the report for the next rolling up quarters to the selected quarter in the prompt.
    Ex. If user has selected 2010-Q2 then report should show the data for 2010-Q3, 2010-Q4,2011-Q1 and 2011-Q2.
    Please suggest, how to implement as we are just aware of AGO function in OBIEE.
    Thanks
    Meera

    You see, if course, that your first issue is that 2010-Q2 is a CHAR field and to apply time functions, you need to work with actual dates. So you will need to map the dates to the appropriate quarter and year. Once you have that, here is how to build it:
    1) TIMESTAMPADD(SQL_TSI_QUARTER,-1,TIMESTAMPADD(SQL_TSI_DAY,-(DAY_OF_QUARTER(yourdatecolumn))+1,yourdatecolumn))
    As I mentioned in the other thread that Kart quoted, the formula above will give you the first day of the quarter in which the date column exists. The date column is the one your user will pick. Now, to get the 4th quarter after this, use this SQL:
    2) TIMESTAMPADD(SQL_TSI_QUARTER, 4,TIMESTAMPADD(SQL_TSI_QUARTER,-1,TIMESTAMPADD(SQL_TSI_DAY,-(DAY_OF_QUARTER(yourdatecolumn))+1,yourdatecolumn)))
    The above SQL will give you the 4th quarter after the one in 1)
    Now you have your two endpoints. Build your filter on the time column in your report and it should be between 1) and 2).

  • Rules - Parent entity not rolling up from base calcs

    What's the problem: Parent Entity member is calculating with a number for a certain account, even though I've specifically excluded this from happening in my rule. I don't want the parent entity to calculate
    What should happen: Parent Entity member should just add up the result of its children for that account
    Hi guys,
    I have a calculation that is designed to specifically run at base entity level only. So I'm expecting that the parent result for a certain account should just be the addition of the results in its child entity members for that account
    You can see from the code snippet below that I'm running the statements only when they're enclosed by the vIsBaseEntity conditional statement.
    I want to get the required number, a simple A-B calc which looks at the change from prior year (but flips the sign if it's an equity account) into the SBS_MOVE custom 1 member.
    If vIsBaseEntity then
         For Each vBSMoveAcct in HS.Account.List("","CalcBSMovementAccounts")
              If HS.Account.UD2(vBSMoveAcct) = "Equity" Then
         HS.Exp "A#" & vBSMoveAcct & ".C1#SBS_MOVE." & All_NONES_XC1C2C4 & " = A#" & vBSMoveAcct & "." & ALL_TOPS_XC2C4 & " - A#" & vBSMoveAcct & ".Y#Prior.P#Last." & ALL_TOPS_XC2C4
              Else
              'Standard Calculation
              'C1#SBS_MOVE = Prior Year End Amount - Current Period Balance Sheet Amount
              HS.Exp "A#" & vBSMoveAcct & ".C1#SBS_MOVE." & All_NONES_XC1C2C4 & " = A#" & vBSMoveAcct & ".Y#Prior.P#Last." & ALL_TOPS_XC2C4 & " - A#" & vBSMoveAcct &"." & ALL_TOPS_XC2C4
              End If
         Next
    end if     
    However what actually happens is that whilst the base entities do calc, as specified in the rule, the parent entity does as well for a few accounts, even though that's not specified anywhere in my rule (or in my rules file anywhere else)
    The parent entity for a certain account (Pl reserves), instead of giving me the result of (Current Year YTD minus Prior Year YTD), just gives me the result of Current Yr YTD, or just the A part of the A-B.
    The above code is the only place where SBS_MOVE calculates.
    I've tried to use a HS.Clear to clear that parent intersection first but to no avail.
    So the intersection doesn't have any erroneous data left in it, it actively calculates a result for that parent member when I've specifically told it not to! Why???
    Please help!
    Thanks,
    Sal

    To expand a little on this for newbies who may look for this problem:
    The aggregation operator never aggregate means that nowhere in your application will any intersection containing this member aggregate so if this is your problem the symptoms will be:
    1. Dynamic Calc doesn't work.
    2. Any aggregation scripts that are aggregating on intersections with that member will not work
    eg. for example you have a member "no project" and you set it to never aggregate, then any parents in any dimension where they intersect with "no project" will fail to show data, whether they be dynamic calc or you are running a script.
    If you have months or quarters the easiest way to see this is that suddenly the automated sums on the forms where you are using your "no project" member stop working so that your period data doesn't roll up into quarter or year.
    Agnete
    Edited by: Agnete on Oct 8, 2012 7:58 PM

  • Rolling variables in OBIEE

    Hi All,
    can any one suggest me, that how can we assing Session Variables for every quarter in a year( Rolling Prior 5 qtrs ). I need 5 trend revenues for every Quarter, i mean if i take QTR2 in 2011 then it will show all before 5 quarters in 2011 ( like QTR1 2011, QTR4 2010, QTR3 2010, QTR2 2010, QTR1 2010 ).
    i would appreciate if you could let me know.
    Thanks !!

    You could use the periodrolling function
    PeriodRolling(<<Measure>>, <<Starting Period Offset>>, <<Ending Period Offset>>)
    and 'pin' the measure on the quarter level
    PeriodRolling(<<Measure>>, -5,0)
    regards
    John
    http://obiee101.blogspot.com/
    http://obiee11g.com/

Maybe you are looking for

  • How can I bring my Mac 24'' abroad???

    I am moving to China to work abroad and want my Apple Computer with me! Sorry if the questions is not under the correct subject too... 1) How can I take it over there safely? Can I use it as a carry-on? 2) Does the Apple store provide boxes like the

  • Use G4 in a network

    I'm not sure where to post this. We have early model G4 466 Mhz that has factory CD & Zip drives original HD crashed several years ago and I exchanged it out for either 200 or 250 Gig HD, that shows up in profiler as 114 Gig & I think there is still

  • HR attendance through PS

    Dear Sir, We are assigning 10 persons to a project. So we are making them as indivisual activities. We also have created a work center through CNR1 and assigned cost center to it. In the project we have made activity type indivisually so as to make c

  • ITouch will not come on, only displays picture of USB cord and iTunes

    My daughter's iTouch will only display a picture of the USB cord with an arrow pointing to an iTunes icon.  I have turned it off (it will give you the bar to turn it off) and reset it, but it will not work.  When I plug it into the computer (iTunes)

  • How to backup Safari bookmarks?

    I ordered Snow Leopard and want to do a clean install when it arrives. How do I backup my Safari bookmarks so I can transfer them over? Thanks.