SQL for Time Series Functions AGO and YTD

When we use a time series function such as AGO or TODATE, OBIEE creates 2 physical queries. One query reads the calendar table. The other query reads the fact table without any date filter in the WHERE clause. Then the results of the 2 queries are stitched together. The query on the fact table returns a lot of rows because there is no filter on date.
Is there a way to force OBIEE to put a filter on the date when performing the physical query on the fact table when using AGO or TODATE?
Thanks,
Travis
v11.1.1.6

We do have a date filter on the analysis. We need the analysis to show sales for a certain month and sales for that month a year ago, so we use the AGO function. However, it is really slow because it does a physical query on the sales table without filtering on date and then filters the results of that physical query by the dates from the physical query on the calendar table.

Similar Messages

  • Like Time Series function AGO, but for Future calculations

    Hello All,
    Is there a time series function that can do the same as AGO but going forward?.
    I tried using the same AGO function but adding <<number of periods>> = -1, but that didn't work.
    I'm interested on getting daily, monthly or yearly future calculations.
    Thanks.
    Edited by: PabloC2 on Mar 3, 2009 1:37 PM

    Hi
    try this
    and in 6th point of blog entry, you may need to put plus symbol to add
    http://shivabizint.wordpress.com/2008/09/19/rolling-months-data-for-year-month-prompt-in-obiee/
    i didn't check.. but hope it works out

  • Time Series Function-Ago

    Hi Guys,
    I have an issue with the AGO function.
    I have used a formulae some thing like below.
    Ago("CCLRDC"."Fact - Balances Measures"."YTD Balance" , "CCLRDC"."Period"."Month" , 3)
    Similarly like for month 2 and month 1.Well the point is I need a ytd bal for the prev 3 months and current month too.
    When I pass the filter as APR-2012 im getting data for APR-12,MAR-12,FEB-12,JAN-12 But
    When I pass the filter as MAR-2012 im only getting data for MAR-12,FEB-12,JAN-12 but could not get data for DEC-11
    Please someone help me out .
    Thank You,
    Aru

    Its been working when for the same year but when it rolls back to previous year its nt working

  • How to apply time series function on physical columns in OBIEE RPD

    Hi,
    I know a way to apply time series function(Ago and ToDate) by using existing logical columns as the source. I have set the chronological key and created time dimension. In the expressiion builder for the same Time Dimension appears at the Top so that we can use its level.
    But I couldn't apply a time series function when i have to create a logical column using physical columns. In the expression builder for the same, Time dimension does not appear in the list. Neither can i use any column from the time dimension. Please let me know a way to do it.
    Thanks.

    Time series functions are - by design and purpose - only valid for derived logical columns and not useable inside physical mappings.
    If you want / need to do it on a physical level, then abandon the time series functions and do it the old-school way with multiple LTS instances.

  • Time series functions are not working in OBIEE for ESSBASE data source

    Hi All,
    I am facing a problem in OBIEE as I am getting error messages for measure columns with Time series functions(Ago,ToDate and PeriodRolling) in both RPD and Answers.
    Error is "Target database does not support Ago operation".
    But I am aware of OBIEE supports Time Series functions for Essbase data source.
    using Hyperion 9.3.1 as data source and obiee 11.1.1.5.0 as reporting tool.
    Appreciate your help.
    Thanks,
    Aravind

    Hi,
    is because the time series function are not supported for the framentation content, see the content of the oracle support:
    The error occurs due to the fact the fragmented data sources are used on some Time series measures. Time series measures (i.e. AGO) are not supported on fragmented data sources.
    Confirmation is documented in the following guide - Creating and Administering the Business Model and Mapping Layer in an Oracle BI Repository > Process of Creating and Administering Dimensions
    Ago or ToDate functionality is not supported on fragmented logical table sources. For more information, refer to “About Time Series Conversion Functions” on page 197.
    Regards,
    Gianluca

  • Use of time series functions with horizontally fragmented fact tables

    Hi Guys,
    in OBIEE 10g it wasn't possible to use time series functions [AGO, TO_DATE] on horizontally fragmented fact tables. This was due to be fixed in 11g.
    Has this been fixed? Has somebody used this new functionality? What the the limitations?
    Tkx
    Emil

    Hello,
    Can you give us some examples for "horizontally fragmented fact tables", we can tell you whether we can do that or not?
    Thanks,

  • Time series functions in OBIEE

    Hi
    I am new to OBIEE.
    In Report i want to use the AGO function to find the previous quarter revenue
    But the AGO function requires time dimension level as shown in following syntax
    how should i insert it in the function
    Syntax
    AGO(expr, [time_level], offset)
    Thanks
    Sravanthi

    Once you have day dimension with checked for 'Time dimension'
    you can see day dimension in rpd expression builder, once you select the function you'll choose each columns.
    for ref:
    Check these links
    http://gerardnico.com/wiki/dat/obiee/ago
    or
    http://iniu.net/content/obiee-time-comparison-using-time-series-function-ago
    Pls mark as correct

  • Bad performance due to the use of AGO and TO_DATE time series functions

    Hi all,
    I'm building an OBI EE Project on top of a 1TB DW, and i'm facing major performance problems due to the use of the AGO and TO_DATE time series functions in some of the Metrics included on the reports. I discovered that when a report with one of those metrics is submited to the DB, the resulting query/explain plan is just awful!... Apparently OBI EE is asking the DB to send everything it needs to do the calculations itself. The CPU cost goes to the roof!
    I've tried new indexes, updated statistics, MV's, but the result remains the same, i.e., if you happen to use AGO or TO_DATE in the report you'll get lousy query time...
    Please advise, if you have come across the same problem.
    Thanks in advance.

    Nico,
    Combining the solution to view the data in dense form (http://gerardnico.com/wiki/dat/obiee/bi_server/design/obiee_densification_design_preservation_dimension), and the use of the lag function (http://gerardnico.com/wiki/dat/obiee/presentation_service/obiee_period_to_period_lag_lead_function) appears to be the best solution for us.
    Thanks very much.

  • YTD, MTD, YAGO, Function (Time-series Functions TODATE, AGO) Like OBIEE

    Dear BO Gurus,
    I am a newbie to business object. I would like to ask are there any ready made time series functions which can be used in the BO Semantic layer (universe).
    Like Year to Date, Year Ago. Functions like TODATE and AGO functions found in OBIEE semantic layer (siebel analytics). It was just simple there, I had to use the function on the semantic layer and BI server would raise the query to get the answer.
    The syntax was
    Todate(measure, time_dim_attribute)
    Ago(measure, Time_Dim_Attribute, period)
    Thanks & Regards
    Ishaq

    Dear Gurus,
    There is no DB function in oracle to do this (AGO/TODATE).
    OBIEE issues time-series queries, in the form of AGO and TODATE. AGO gives you, for example, the value of sales one month ago or one quarter ago, whilst TODATE gives you the total of sales month-to-date, or quarter-to-date, or year-to-date. Both of these time-series functions rely on the existence of a time dimension in your business model and mapping layer, with the period you can refer to in the AGO and TODATE functions being determined by what levels you have in this time dimension.
    This eliminates the need to create and store complex time-based
    reporting tables.
    I would only like to know does the universe designer has this sort of functionality which is present in OBIEE semantic layer. Or I need to create and store time-based reporting tables.
    The question can best be answered by some-one has worked on both the BI platforms (OBIEE and BO).
    Thanks & Regards
    Ishaq

  • How to use time series functions for this requirement

    we are on OBIEE 11g (11.1.1.5)
    Any pointers and links are really helpful.
    I have a requirement where YTD sales are displayed in a column. We wan to compare that number to what that number was last year at the same time. Tried to use TODATE, AGO and it did not work.
    || used for column seperation below.
    ProductGroup || YTD Sales Rev||YTD Sales Rev 1 Year Ago||YTD Sales Rev 2 Years Ago
    Climate Solutions || 1.7 mil (1/1/2011 - 7/1/2011) || 1.45 mil (1/1/2010 - 7/1/2010) || 1.15 mil (1/1/2009 - 7/1/2009)
    Thanks in advance
    kris
    Edited by: user566193 on Aug 10, 2011 6:06 PM

    Kris,
    Basically you want to combine the 2 time series functions here i.e. TODATE & AGO.
    Here you go..
    You can create first a YTD logical column in BMM say YTD Sales Rev..Then create another logical column with calculation as AGO(YTD Sales Rev, YEARDIM, 1) or AGO(YTD Sales Rev, MONTHDIM, 12).
    Similarly, you create other measures...OBIEE 11g has time series function in Answers as well but I'd say try to create using RPD as you to calculate 1 logical column based on another. Better to push it on RPD side.
    Hope this helps

  • Last Year MTD/YTD Column Without Using Time Series Function

    I need to calculate MTD and YTD of last year without using time series function.
    My requirement is like:
    We are working on Fiscal year.
    Suppose user will select a date: 15-Jan-2013

    Use a period table with Period Ago attributes and join these to an alias of your fact table. In other words, use a period table (let's say Day is grain) that would have
    WAgo, QAgo, YAgo, (etc.) attributes for each day. Join this table to aliases of the fact tables on these columns.
    Thanks.

  • Time series functions are not working for fragmented logical table sources?

    If i remove that fragmented logical table sources, then its working fine.
    if any body know the reason, please let me know.
    thanks and regards,
    krishna

    Hi,
    is because the time series function are not supported for the framentation content, see the content of the oracle support:
    The error occurs due to the fact the fragmented data sources are used on some Time series measures. Time series measures (i.e. AGO) are not supported on fragmented data sources.
    Confirmation is documented in the following guide - Creating and Administering the Business Model and Mapping Layer in an Oracle BI Repository > Process of Creating and Administering Dimensions
    Ago or ToDate functionality is not supported on fragmented logical table sources. For more information, refer to “About Time Series Conversion Functions” on page 197.
    Regards,
    Gianluca

  • How to find the year ago measure with out using time series functions

    hi all
    is there any way to find year ago sales with out using time series functions like ago
    Thanks
    Sreedhar

    Hello Madan,
    Thanks for the reply.
    It still doesn't consider the product into account.
    My columns are as below
    Prod Week End DATE Current Sales Prior Sales % Change
    A 12/4/2010 100 0
    A 12/11/2010 200 100
    A 12/18/2010 300 200
    B 12/4/2010 400 300(this value is not for prod B, i want this to b 0 aswell. But we get product A's last sale amount)
    Is there any way this can be done. I have tried evaluate,MSUM.
    I cannot build a time dimension as all I have is a view.
    Thanks,
    Deep

  • Drilldowns on measure columns based on time series functions.

    Guys,
    I am new to OBIEE and i need your Help!! I have a dashbaord report which shows the sales USD for the colums below.
    REGION , PRIOR MONTH , CURRENT MONTH PRIOR YEAR , CURRENT MONTH PRIOR YEAR MTD , CURRENT MTD , ACTUALS YTD.
    All the measures are logical columns caluculated in the RPD using the Time Series Functions. The dasboard report has a Prompt Calender Date and all the measure values are caluclated based on the date entered in the prompt.
    For example if the Calender Date on the prompt is 5/31/2011 then the value for the PRIOR MONTH will the sales for APR-2011 and the value for CURRENT MONTH PRIOR YEAR will be MAY-2010 and so on.
    The business requirement is to provide the drill down capability on these measure columns. When i click the sales number on the prior month column it should give me all the detailed transactions for the month of APR-2011 considering the prompt for calender date is 31-MAY-2011.
    I have provided drilldowns based on the Navigation using the column interatcion but i am unable to understand how to provide the drilldown on the measure columns using the time series functions to caluclate the sales for PRIOR MONTH. CURRENT MONTH PRIOR YEAR...etc.
    Please Help!!!
    Thanks,
    Sandeep.

    1. Create an alias fact table (Year Ago) to pull last year value.
    2. Extend your fact table to store another measure (last year sales)
    3. Based on volume of granular data and query pattern on year ago measures, you may create aggregate fact tables.
    hope this helps.

  • Perf issues with Time series function in OBIEE

    Attached is the SQL:
    SELECT SUM (T256675.ACTIVITY_GLOBAL2_AMT) AS c1,
    SUM (T256675.ACTIVITY_GLOBAL3_AMT) AS c2
    FROM X_FINANCIAL_HIERARCHY_DH T610485 /* Dim_X_GLACCT_ALTVIEW_D */,
    X_FINANCIAL_HIERARCHY_DH T610414 /* Dim_X_MGMT_ENTITY_D */,
    W_GL_ACCOUNT_D T256463 /* Dim_W_GL_ACCOUNT_D */,
    W_GL_BALANCE_F T256675 /* Fact_W_GL_BALANCE_F */,
    SAWITH3,
    SAWITH6
    WHERE ( T256463.ROW_WID = T256675.GL_ACCOUNT_WID
    AND T256463.X_FIN_HIER1_WID = T610485.ROW_WID
    AND T256463.X_FIN_HIER5_WID = T610414.ROW_WID
    AND T256675.BALANCE_DT_WID = SAWITH3.c3
    AND SAWITH6.c1 = SAWITH3.c1
    AND T610414.ACCOUNT_HIER8_NAME = 'Worldwide'
    AND T610414.HIERARCHY_SOURCE = 'EntityMgmt'
    AND T610485.ACCOUNT_HIER7_NAME = 'Controllable Expenses'
    AND T610485.HIERARCHY_SOURCE = 'AltViews'
    AND SAWITH6.c3 = '2009 / 11'
    AND SAWITH6.c2 >= SAWITH3.c2
    The SAWITH3 and SAWITH6 dimensions using time series fuctions are causing a full table scan on W_GL_BALANCE_F and W_GL_ACCOUNT_D . Though we are interested in just getting 2009/11 data; the queries generated by time series function TODATE is taking us against entire W_DAY_D data and is causing several performance issues.
    W_GL_BALANCE_F table has index on GL_ACCOUNT_WID and BALANCE_DT_WID.
    How can we force to use index on these columns for better performance.
    Please advise us on the right approach to improve performance.
    SQL for SAWITH3
    ===========
    WITH SAWITH0 AS
    SELECT T31328.ROW_WID AS c3, T31328.PER_NAME_FSCL_QTR AS c4,
    ROW_NUMBER () OVER (PARTITION BY T31328.PER_NAME_FSCL_QTR ORDER BY T31328.PER_NAME_FSCL_QTR DESC)
    AS c5,
    T31328.PER_NAME_FSCL_MNTH AS c6,
    ROW_NUMBER () OVER (PARTITION BY T31328.PER_NAME_FSCL_QTR, T31328.PER_NAME_FSCL_MNTH ORDER BY T31328.PER_NAME_FSCL_QTR DESC,
    T31328.PER_NAME_FSCL_MNTH DESC) AS c7
    FROM W_DAY_D T31328 /* Dim_W_DAY_D_Common */),
    SAWITH1 AS
    SELECT CASE
    WHEN CASE SAWITH0.c5
    WHEN 1
    THEN SAWITH0.c3
    ELSE NULL
    END IS NOT NULL
    THEN RANK () OVER (ORDER BY CASE SAWITH0.c5
    WHEN 1
    THEN SAWITH0.c3
    ELSE NULL
    END ASC NULLS LAST)
    END AS c1,
    CASE
    WHEN CASE SAWITH0.c7
    WHEN 1
    THEN SAWITH0.c3
    ELSE NULL
    END IS NOT NULL
    THEN RANK () OVER (PARTITION BY SAWITH0.c4 ORDER BY CASE SAWITH0.c7
    WHEN 1
    THEN SAWITH0.c3
    ELSE NULL
    END ASC NULLS LAST)
    END AS c2,
    SAWITH0.c3 AS c3, SAWITH0.c4 AS c4, SAWITH0.c6 AS c5
    FROM SAWITH0),
    SAWITH2 AS
    SELECT MIN (SAWITH1.c1) OVER (PARTITION BY SAWITH1.c4) AS c1,
    MIN (SAWITH1.c2) OVER (PARTITION BY SAWITH1.c4, SAWITH1.c5)
    AS c2,
    SAWITH1.c3 AS c3
    FROM SAWITH1),
    SAWITH3 AS
    SELECT DISTINCT SAWITH2.c1 + 5 AS c1, SAWITH2.c2 AS c2,
    SAWITH2.c3 AS c3
    FROM SAWITH2),
    SQL for SAWITH6
    ===========
    SAWITH4 AS
    SELECT T31328.PER_NAME_FSCL_MNTH AS c3, T31328.ROW_WID AS c4,
    T31328.PER_NAME_FSCL_QTR AS c5,
    ROW_NUMBER () OVER (PARTITION BY T31328.PER_NAME_FSCL_QTR ORDER BY T31328.PER_NAME_FSCL_QTR DESC)
    AS c6,
    ROW_NUMBER () OVER (PARTITION BY T31328.PER_NAME_FSCL_QTR, T31328.PER_NAME_FSCL_MNTH ORDER BY T31328.PER_NAME_FSCL_QTR DESC,
    T31328.PER_NAME_FSCL_MNTH DESC) AS c7
    FROM W_DAY_D T31328 /* Dim_W_DAY_D_Common */),
    SAWITH5 AS
    SELECT CASE
    WHEN CASE SAWITH4.c6
    WHEN 1
    THEN SAWITH4.c4
    ELSE NULL
    END IS NOT NULL
    THEN RANK () OVER (ORDER BY CASE SAWITH4.c6
    WHEN 1
    THEN SAWITH4.c4
    ELSE NULL
    END ASC NULLS LAST)
    END AS c1,
    CASE
    WHEN CASE SAWITH4.c7
    WHEN 1
    THEN SAWITH4.c4
    ELSE NULL
    END IS NOT NULL
    THEN RANK () OVER (PARTITION BY SAWITH4.c5 ORDER BY CASE SAWITH4.c7
    WHEN 1
    THEN SAWITH4.c4
    ELSE NULL
    END ASC NULLS LAST)
    END AS c2,
    SAWITH4.c3 AS c3, SAWITH4.c5 AS c4
    FROM SAWITH4),
    Thanks
    Srini Pendem

    Hi Srini,
    I've had quite a bit of performance issues with ToDate and Ago. I tended to create materialized views on my fact tables that would materialize those values as columns and that way I would avoid having to use the ToDate or Ago functions. Is there any chance you can implement a similar solution and bypass the time series functions entirely?
    Just to check, those tables belong to BI Apps, right? If so, you can log an SR about the performance issue since it's an issue with the model that Oracle sold you.
    Good luck!
    -Joe

Maybe you are looking for

  • USB Ports Dead after undock and redock W510 in Minidock Plus Series 3

    Hi, just personalized a new W510 (Win XP 32) for a user and installed it on his desk. Everything worked fine except for one thing. I start the NB in the Docking Station with an external keyboard and mouse (original IBM/Lenovo) attached. Works fine. T

  • Hash join

    I have an index on CAT_MAP_ID column of STM_RPT_ITEM_PH6_MV but I don't know why it's not using nested look join for 21 rows returned (outer) to join 641k rows in STM_RPT_ITEM_PH6_MV table. I think that's the reason this query is consuming very high

  • Currency Format in Crystal Report Version 10.5 (Free With Visual Studio)

    Hi , We are using free version of crystal report that comes with VS2008. We are in the need to display the amount in the following format and we are not able to do so. Here is what we need to achieve 10000000---- Need to display as 1,00,00,000  10000

  • SAP NetWeaver Application Server ABAP 7.03 64-bit Trial - License

    I have recently download the SAP NetWeaver Application Server ABAP 7.03 64-bit Trial version for use on Windows Server 2008R2.  I went to get a license key and noticed this was only a 90 day license.  Is it possible to extend the licensing out to lon

  • Unable to login Windows 7 after disable Veriface 4.0

    Hi all, i accidentally activated veriface 4.0 in my Ideapad U410 but find it useless and disabled it. When i try to turn on my laptop the next day, was asked for password which i never set one. now im stuck at windows login without password and do no