Ago Measures

Hi All,
I am a little confused on how to solve this issue.
I have a table that has a list of all accounts, account balance, and date.
Each day this table gets an entry even if the balance does not change.
Acct 1 50.00 01/01/09
Acct 1 50.00 01/02/09
Acct 1 50.00 01/03/09
Acct 1 100.00 01/01/10
Acct 1 100.00 01/02/10
Acct 1 100.00 01/03/10
What I am trying to do is compare the account balance from yesterday, to one year ago.
In the BMM layer I have a column that holds the balance amount, and the aggregation is set to SUM
I also created a YEAR AGO column.
But my results are a bit strange. The BALANCE column SUMS the balance amount for every entry. In this case the it would show $300.
In the end it seems to be summing each entry in the table. What I want to do is compare the total value of all accounts yesterday to the total value of all accounts 1 year ago yesterday.
How can I accomplish this?

I think I figured out what you meant.
So I used the calculation wizard to create the differences. So no my answer looks like this
          Balance YAGO Chg YAGO %Chg YAGO
4/14/2010 12:00:00 AM      699      745      -46           -6
4/15/2010 12:00:00 AM      699      745      -46           -6
4/16/2010 12:00:00 AM      699      745      -46           -6
4/17/2010 12:00:00 AM      699      745      -46           -6
4/18/2010 12:00:00 AM      699      745      -46           -6
4/19/2010 12:00:00 AM      699      745      -46           -6
4/20/2010 12:00:00 AM      699      745      -46           -6
4/21/2010 12:00:00 AM      699      745      -46           -6
4/22/2010 12:00:00 AM      699      745      -46           -6
If I add a filter to only give me yesterday's data (current_date -1)
4/22/2010 12:00:00 AM 699 699 100
The YAGO balance seems to disappear.
Is there anyway to limit this to just comparing yesterday to a yr ago yesterday?

Similar Messages

  • Calculation of Ago Measures

    My scenario is: If current month is 2009-9, I need to calculate two ago measures, one is last year same month (2008-9), the other is last year total (2008).
    How can I calculate the two ago measures in Essbase?
    I know there is Dynamic Time series Members in Essbase, could they do the ago calculation? if yes, how?

    You would want to look at the @prior function. It typically goes back in your time dimension, but can also go back in other dimensions. There are also variations like @shift, @mdshift, @priors, stc.

  • Year Ago Measure group by problem.

    Hi,
    In my report I have two measures Revenue and Revenue Year Ago.
    Revenue Year ago is calculated based on the Ago functionalty and the time dimension level is "Year"
    AGO(Fact.Revenue, TimeDimnesion."Year", 1).
    The problem is that the column measure Revenue Year Ago is not getting added up to display data when we select based on the time dimension.
    e.g.
    Dimnesion Month-Code Revenue Revenue Year Ago
    A Jan-10 100 90
    A Feb-10 200 160
    B Feb-10 250 200
    In my report I want to display the Dimension, Revenue and Revenue Year Ago for the month of 'Jan-10' and 'Feb-10'
    so that automatic group by happens for the measures like this.
    Dimnesion Revenue Revenue Year Ago
    A 300 250
    B 250 200
    But this is not happening when I apply the filter for Month-Code in ('Jan-10' and 'Feb-10') and the result what OBIEE gives is null value for Revenue Year Ago.
    Dimnesion Revenue Revenue Year Ago
    A 300 NULL
    B 250 200
    But when I remove the Month-Code filter it gives the correct result.
    So is there something that I am missing out. Please advice.
    TimeDimnesion Hierarchy is Total(Grand Total) -> Year (Year Id, Year Code) -> Qtr (Qtr Id, Qtr code) -> Month
    (Month-Id,Month-Code) -> Detail (Day-Id, Day-Code)
    Regards,
    Bhavik

    if you can give a small test case to play around, it
    might be helpfule.
    put the data in the table and show the output you
    desire.An example-
    STORE
    StoreID StoreName Location
    s1 ABC NY
    s2 XYZ LA
    PRODUCT
    ProdID ProdName
    p1 foo
    p2 moo
    TRANSACTION
    TransID Fiscal_Yr StoreID ProdID Rating Price
    t1 2002 s1 p1 A 10
    t2 2002 s1 p1 A 80
    t3 2002 s1 p2 A 15
    t4 2002 s1 p1 B 20
    t5 2003 s2 p1 B 50
    If the query below is executed-
    SELECT t.Fiscal_Yr, s.StoreName, p.ProdName, t.Rating, SUM(t.Price) Revenue
    FROM STORE s, PRODUCT p, TRANSACTION t
    WHERE s.StoreID = t.StoreID
    AND p.ProdID = t.ProdID
    GROUP BY t.Fiscal_Yr, s.StoreName, p.ProdName, t.Rating
    ORDER BY t.Fiscal_Yr, Revenue DESC
    then, we get
    Fiscal_Yr StoreName ProdName Rating Revenue
    2002 s1 foo A 90
    2002 s1 foo B 20
    2002 s1 moo A 15
    2003 s2 foo B 50
    But, irrespective of different ratings for the same product, the revenue should be added and I should get rating as listed in the first transaction for that product for a particular store and Fiscal_Yr. So, my desired result should be-
    Fiscal_Yr StoreName ProdName Rating Revenue
    2002 s1 foo A 110
    2002 s1 moo A 15
    2003 s2 foo B 50

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

  • Does OBIEE 11.1.1.7 support AGO function at Week level

    Hi,
    I have a time dimension with Year,Quarter,Month,Week and Day Levels.
    Year - 2013,2012...
    Quarter- Q1,Q2,Q3,Q4
    Month - 1,2,3..12
    Week - 1,2,...52
    Day - Date_id (20130101...(YYYYMMDD).
    My Keys are : Year Level(Year_Number)
    Quarter Level (Year+Quarter Number)
    Month Level(Year+Month number)
    Week Level(Year+Week number)
    Day - Date_id(also defined as chronological keys)
    I am creating a AGO(Measure,Level,1) in answers for Year and Week Level and they don't render correct results.
    I started building the hierarchy with only Year and Day levels..verified the results - Looks Ok.
    Similar fashion proceeded with Year,Quarter,Month and Day - Looks OK.
    When I introduce Week level - All the AGO values are incorrect.
    Any help on this is really appreciated.
    Regards,
    Swetha

    Thanks Srini Veeravalli for your reply.
    Yes I have verified it thoroughly.I have implemented this before on 10G for other customers and I don't feel that something is wrong with it .
    I found this link on AGO Function in OBIEE 11G:
    =======================================
    https://forums.oracle.com/message/9323083
    Does a month have always the same number of week and begin with the first day of a week ?
    If it's not the case, your dimension is not good when you make a report on the week grain for a year ago for instance.
    Here a check list:
    http://gerardnico.com/wiki/dat/obiee/ago_todate_configuration#timecalender_dimension_design_verification
    ============================================
    OBIEE 10G/11G - How to set up the time dimension (for time series functions Ago, Todate, ...) ? | GerardNico.com …
    In the above post also, Time dimension configuration for AGO/TODate ( Time series) are set up with 4 levels: Year,Quarter,Month and Day.
    So Just needed a confirmation  if week level shouldn't be in the hierarchy in 11.1.1.7.
    Regards,
    Swetha

  • AGO function issue

    Hello
    Im trying to use the AGO function in in my Column Formula to compare the difference between month to month. The formula is as follows:
    AGO("Fact - Revenue"."Revenue - DW","Period"."Period",1)
    ... but every time im getting the error message:
    Formula syntax is invalid.
    [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 27037] Unresolved level: "Period"."Period". (HY000)
    SQL Issued: SELECT AGO("Fact - Revenue"."Revenue - DW","Period"."Period",1) FROM "LC ELT - Revenue and Margin"
    Not sure why this is. I have tried not inserting the 'time level' option which doesn't give me an error but does give me slightly incorrect results, just off the correct value.
    Has anyone experienced this before? If so, could you please let me know what you did to resolve it?

    The Ago syntax is
    Ago(<<Measure>>, <<Level>>, <<Number of Periods>>)
    I dont think "Period"."Period" is a level from time dimension.
    In your case valid Levels are
    - Year
    - Half
    - Quarter
    Pls mark as correct/helpful if helps
    Edited by: veeravalli on Nov 19, 2012 5:31 PM

  • 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

  • Last argument in AGO function

    Hi Everyone...
    Hope everyone is good .
    So we have this requirement where user want to see selected quarter last month, then previous quarter last month and previous year last month based on Year and Quarter selection. for example.
    Prompts: Year - 2013; Quarter - Q2
    Selected Month (1)
    Last Qtr Last Month (2)
    Diff of 1 - 2
    Last Yr Last Month (3)
    Diff of 1 - 3
    Country
    Jun-13
    Mar-13
    Qtr Diff
    Dec-12
    Yr Diff
    USA
    1000
    500
    500
    700
    300
    UK
    1500
    900
    600
    1200
    300
    Now if user select Quarter as Q3 then report will show:
    Selected Month (1) - Sep-13
    Last Qtr Last Month (2) - Jun-13
    Last Yr Last Month (3)- Dec-12
    So the idea is to take always last month of selected last month, last qtr last month and last yr last month.
    Now I am using AGO function to get the Last Yr Last Month (3) where I need to pass the last argument as a dynamic value.
    AGO("measure","month","month Number")
    But OBIEE say that the last argument should be a consistent integer. So is there any way where we can pass dynamic value of "Number of Period". For example
    for Q1 : AGO("measure","month",3)
    for Q2 : AGO("measure","month",6)
    for Q3 : AGO("measure","month",9)
    for Q4 : AGO("measure","month",12)
    I can use CASE statement for this but will it not create performance issue, just curious?
    Please help me if we can do this in this way or can you please suggest me any other way to do this.
    Thanks,
    Suhel Dayer

    Any thoughts here.... Need help..
    Appreciate your time and efforts.
    Thanks....
    Suhel

  • Ago Function gives NULL values

    Friends,
    I need help regarding Ago function available at column level in BMM.
    I am not at all receiving any error. Unfortunately after Ago function implementation i am getting NULL values for that particular column.
    Here are my implementation steps for getting "Month Ago" values for "Amout column" in Sales table.
    1. i have created Time dimension hieararchy.
    It is like this - Year - > Quarter - > Month - > Actual Date
    2. Defining Keys and making them chronological are also done.
    3. Actual Date is the PK and joins with my Fact.
    4. "Amount" Column in Fact is set to 'Sum'.
    5. i created a new column named " Amount Month Ago" and set following logic to its expression builder.
    Ago("AR Reserve"."Fact - AR Reserve Calc Dtl"."Amount" ,  "AR Reserve"."Dim - TimeDim"."Month" , 1)
    I have not received any error.
    Once i pull this new column (Amont Month Ago) into the presentation layer and try to create a Tabular report. It is not showing any value. Other column values are OK as expected.
    I know i am missing something important here.
    Requesting you all to guide me. I am working on OBIEE 10g.

    Hi,
    Hitting a 'NULL' value in the report hints me of some issues with the Hierarchy/Content setup of the LTS. I suggest you to enable level 7 log and see if the AGO(<measure>) is being nullified by the BI Server due to incompatible facts.
    If it is, then you got to revisit your Period hierarchy and content settings in the Fact LTS. Some generic suggestions are,
    1. Create hierarchies for all dimensions available.
    2. Set the granularity of the sources in the fact to all available hierarchies.
    Hope this helps.
    Thank you,
    Dhar

  • AGO function error in Pivot Table

    Hi,
    I have a typical time dimension - year, period, week, date. Most of my facts are available at the most detailed level of date however I have some Budget facts that are only available at the week level. When I combine these facts in a report I am having the below problem.
    I use an ago function at the yearweek level ( I needed this so that I can compare week numbers as oppposed to week date ranges which is how the year ago function works - I believe).
    If I have a total on year in my pivot table I get the below error -
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22036] Level in AGO function (YearWeek) must be a rollup of (or equivalent to) the measure level (Year). (HY000)
    Has anyone come across this before ?
    Thanks
    Patricia

    I am getting the following error message, not sure how to get rid of this.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22036] Level in AGO function (Fiscal Period) must be a rollup of (or equivalent to) the measure level (Fiscal Year). (HY000)
    SQL Issued: SELECT "GL Calendar"."Fiscal Period" saw_0, "Project Manager"."Project Manager Name" saw_1, Project."Project Number" saw_2, Project."Business Area" saw_3, Project."Business Unit" saw_4, Project."Delivery Ownership" saw_5, Project.Programme saw_6, "Fact - Project Cost".Cost saw_7, "Ago Measures"."MAGO Cost" saw_8, "Fact - Project Cost".Cost-"Ago Measures"."MAGO Cost" saw_9, REPORT_SUM(saw_7 BY ), REPORT_SUM(saw_8 BY ), AGGREGATE(saw_9 BY ) FROM "Project - Cost" WHERE ("GL Calendar"."Fiscal Year" = '2011') ORDER BY saw_0, saw_1, saw_2, saw_3, saw_4, saw_5, saw_6

  • How Achieve timedseries calculations with out using AGO And ToDate function

    Hi,,
    1)
    How Achieve timedseries calculations with out using AGO And ToDate functionion
    this question asking in interview ..is it possible..?
    if yes please response as soon as possible..
    2) i have 2 cloumns Product and value...
    client requirement is they need ranks based on Value ..in dashboard .using dashboard prompt..edit box...if user enter any number (ex :5 ) report should show top 5 ranks if he enter 20 should be top 20 ranks..
    how to achive this ?
    thanks,
    raj

    Consider yor first question:
    1. Yes, we can create timeseries measures without using AGO and TODATE
    1. Create ALIAS of fact tabe in the physical layer
    2. Join the Time id from the ALIAS fact table with the YAGO_MONTH_ID column from your time dimension table (For calculating Year Ago variants) similarly join with MAGO_MONTH_ID column for Month Ago measures.
    3.Pull the ALIAS tables as an additional Logical table source in the Lgical layer
    4.Keep the mapping of the columns from the ALIAS table as its is
    5. For e.g If you pick Revenue from the Year Ago Alias table it will give you the "Prior Year Revenue"
    See if this helps you

  • Using the Ago Function

    Hi,
    I have a time dimension with levels AllTime, Year, Month, Week, Day. I set the chronological key to the day and created an Ago Measure in my fact. The repository global consistency was successful. However when I used it in answers, I got the following error message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22040] To use AGO function, the storage level of the query ('[DIM_DATE.DIMENSION_KEY]') must be a static level. (HY000)
    SQL Issued: SELECT DIM_DATE.CALENDAR_YEAR_NAME saw_0, F_TEST.MEASURE saw_1, F_TEST.YearAgoMeasures saw_2 FROM WMS ORDER BY saw_0
    Does anyone have any idea please? Note that the DIM_DATE.DIMENSION_KEY is the primary key of the time dimension table.
    Thanks a lot
    Marija

    Hi Wildmight,
    I restarted everything and got the "must be a static level. (HY000)" error fixed. Then I checked the chronological key in the level "year" but it seems not to be working. It's taking a long long time to show the results (I finally cancel it).
    Reviewing the nqquery log file, I don't really get how obi retrieves the todate info, it uses the analytic function: ROW_NUMBER() OVER (partition by....), do you get the same?
    Thanks again.

  • Incorrect values with AGO function

    Hi,
    I am trying to fix a problem where my AGO function is producing close but not 100% correct values.
    I have:
    Fact Table (pk is by date, employee, and measure keys)
    Dim Date Table (only date, month, quarter, year - very simple) Month and quarter are just numbers (not identified by year)
    Dim Emp Table
    I have a logical dimension hierarchy for Dim Date: Total > Year > Quarter > Month > Date
    In my Logical Fact table, I have a SUM column for the measure. My AGO column is just AGO(Measure (SUM), Dim Date.Month, 1)
    For my report, I have tried a few things.
    If I just use the Month column from my Date table, the AGO numbers are way off. If I do MONTH(Date) instead, the AGO numbers are close, and even accurate most of the time, but sometimes they will be a little bit off, by only 1 or 2 usually.
    I'm having the hardest time trying to figure this out, but one thing I'm suspicious of is the Date table - should Month and Quarter be like 2008-01, 2008-02, instead of just 01, 02?

    It would come as no surprise to me if the datetime dim is incorrect. I have been cleaning up someone else's mess.
    The date dim is just this:
    desc date_dim;
    Name                           Null     Type                                                                                                                                                                                         
    DATE_KEY                       NOT NULL NUMBER(8)                                                                                                                                                                                    
    D_YEAR                         NOT NULL NUMBER(4)                                                                                                                                                                                    
    D_MON                          NOT NULL NUMBER(2)                                                                                                                                                                                    
    D_DAY                          NOT NULL NUMBER(2)                                                                                                                                                                                    
    DATE_VALUE                     NOT NULL DATE                                                                                                                                                                                         
    D_QUARTER                      NOT NULL NUMBER(1)                                                                                                                                                                                    
    6 rows selectedFor today's date:
    DATE_KEY               D_YEAR                 D_MON                  D_DAY                  DATE_VALUE                D_QUARTER             
    20090417               2009                   4                      17                     17-APR-09                 2                     
    1 rows selectedI tried making the logical columns for D_YEAR||D_MON and D_YEAR||D_QUARTER, and added them as non-drillable chronological keys in my hierarchy, but still getting the same results.
    Any ideas?
    Edited by: KevinC_VA on Apr 17, 2009 2:40 PM

  • Ago function and BI server crash

    Hi All,
    I intercepted a wierd issue and have been searching web since two days with no helpful outcome. I have a logical column which uses Ago function to calculate the cost in the previous month. As soon as the report runs with the same logical column, the BI server crashes.
    The logical column has the following calculation: AGO("ABC"."Fact"."Cost", "ABC"."Time Dim"."Month", 1)
    I have used the similar calculation in my other fact for calculating Year ago measure. The report having that column works very well.
    Please let me know why should the BI server fail. What can be the possible reasons and if possible, let me know the workaround for the same.
    Your help wil be appreciated..
    Thanks in advance.
    Sumita

    I'll tell the whole sad story:
    Our BI was happily connected to an SQL server 2005 Data warehouse.
    For deployment reasons we decided to move this DW into the oracle 10gR2 DB that comes with the BI package.
    When we remapped the business models to table sources from the Oracle DB the whole thing started crashing - first the BI server, then the Presentation services.
    We've now reduced the connections to one schema, it's still crashing.

Maybe you are looking for