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

Similar Messages

  • LAST Aggregation and AGO Function in OBI Administration Tool

    I'm struggling a bit with the AGO function and LAST aggregation. The problem is when I try to compare balance from the last day from last month compared with last day of this month.
    To get the balance of the last day of this month, I'm using based on dimensions LAST aggregation in the logical column KNSALDOPROMEDIOlast (avg balance).
    KNSALDOPROMEDIOlast:
    Dimension Formula
    Other SUM(BWM.DWH_FTASA.KNSALDOPROMEDIOlast)
    DTIEMPO_Dim LAST(BWM.DWH_FTASA.KNSALDOPROMEDIOlast)
    To get the last day of last month I’m using the existing logical colum KNSALDOPROMEDIOlast applying the AGO function over the time dimension Month -1.
    KNSALDOPROMEDIOlast-1:
    AGO(BWM.DWH_FTASA.KNSALDOPROMEDIOlast, BWM.DTIEMPO_Dim.MES_Dim,1).
    The problem is when the last month has more days than the current month.
    Example:
    Month     Last Day     KNSALDOPROMEDIOlast     KNSALDOPROMEDIOlast-1
    JAN 2010     JAN 31     437,880,393     0
    FEB 2010     FEB 28     484,804,165     442,880,934
    MAR 2010     MAR 31     562,201,480     484,804,165
    APR 2010     APR 30     583,255,351     570,661,690
    MAY 2010     MAY 31     663,660,138     583,255,351
    1. The balance of last day of previous month of February is 442,880,93, is wrong this amount, is from Jan 28th, the real is 437,880,393 from last day of January, Jan 31st. January has more days than February.
    2. The balance of last day of previous month of March is 484,804,165, is correct this amount is from last day of February, Feb 28th. March has less days than February.
    3. The balance of last day of previous month of April is 570,661,690, is wrong this amount, is from mar 30th, the real is 562,201,480 from last day of March, Mar 31st. March has more days than April.
    4. The balance of last day of previous month of May is 583,255,351, is correct this amount is from last day of April, Apr 30th. April has less days than May.
    Edited by: user10541559 on Aug 18, 2010 1:44 PM

    Hi,
    I'm not sure about your issue.
    The aggregation option "LAST" is used when you need the last value, the most typical example of this is inventory, if you want the inventory quantity of a product in a month, you don't sum the value for each day in the month, you only get the value of the inventory in the last day of required month, right?
    Have you tried using session variables?
    You can get the last day of the last month from Oracle DB with the function "LAST_DAY". For example:
    SELECT LAST_DAY(ADD_MONTHS(CURRENT_DATE, -1)) from DUAL
    I know that is not exactly what you need, but I hope I gave you an idea what other things you can try.
    Regards,
    Jorge.

  • AGO function in OBIEE to display weekly sales data of this year vs last yea

    All,
    I would to create an analysis that display this year sales numbers vs last year by weekly
    I was able to do this at month level by specifying the offset value to 12 to the AGO function in repository.
    I am not able to do at week level.
    Can someone please help?
    Thanks

    Check the W_DAY_D or W_WEEK_D for number of weeks per year, validate the year/4 then its leap year then 53
    Use this in ago function at <<Number of Periods>>.
    I think you have to go for 53 based on these tables some times 54.

  • TODATE and AGO function errors in OBIEE

    I have aggregated time dimension. The time calendar comprises of the following structure with a physical table for each level in the Physical Layer -
    Year -> Half Year -> Quarter -> Month -> Week -> Day
    These tables form the calendar. The RPD works fine until I use the TODATE and AGO based fields in the query.
    When I use the AGO and the TODATE time series function to generate the YTD and PY YTD calculations in the Business Modelling Layer. The system gives the following error on Answers -
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22045] AGO function is used on a time dimension which is logically snowflaked. (HY000)
    SQL Issued: SELECT "- Retail Calendar"."Year Identifier" saw_0, "- Sales"."Gallons Sold" saw_1, "- Sales"."Profit Amount" saw_2, "- Sales"."Sales Quantity" saw_3, "- Sales"."Retail Sales Amount" saw_4, "- Sales"."Licensee Sales Amount" saw_5, "- Sales"."% Retail Sales Amount" saw_6, "- Sales"."% Licensee Sales Amount" saw_7, "- Sales"."Store Average Profit" saw_8, "- Sales"."Sales Amount - Last Year" saw_9 FROM "Reporting Objects" ORDER BY saw_0
    Let me know what I am doing incorrect here?
    I have checked all the joins to see if the time calendar has been incorrectly joined, but I can't find anything. Please help.

    Below are the physical tables involved -
    Year - TIME_YEAR_DM
    Half Year - TIME_HALF_DM
    Quarter - TIME_QTR_DM
    Month - TIME_MTH_DM
    Week - TIME_WK_DM
    Day - TIME_DAY_DM
    Each of these tables has an Identifier key (for example, YR_IDNT, HALF_IDNT, QTR_IDNT, etc.) that uniquely identifies the rows. I am using these IDNT fields as my hierarchical keys.

  • Ago function with two dates

    I use OBIEE and I got some difficulties with the times dimensions and the function AGO because I used two differents dates for my measure.
    My fact table:
    Ordered ||Delivered||Amount
    12/21/2008 ||1/20/2009||30000
    1/1/2009 ||2/1/2009 ||20000
    1/1/2009 ||3/1/2009 ||10000
    2/1/2009 ||2/1/2009 ||50000
    2/1/2009 ||3/1/2009 ||50000
    12/25/2009||1/15/2010||10000
    1/1/2010 ||2/1/2010 ||25000
    1/1/2010 ||3/1/2010 ||20000
    1/1/2010 ||2/1/2010 ||20000
    1/1/2010 ||3/1/2010 ||15000
    I have two Times Dimensions (Ordered Times AND Delivered Times) and one fact table. I already tried with 2 facts table and 1 time table without success too cause they not link the value for delivered and ordered
    I want to compare the delivered situation (Amount Qty) for the same ordered day last year
    I created a prompt with a date (ex.: Ordered date <=1/1/2010 AND Delivered date >=1/1/2010) and I want to compare one year ago with 1/1/2009 (Ordered Date situation…)
    I wish the results below:
    Delivered Month||Amount||Previous Amount Year Ago
    1 || 10000 || 30000
    2 || 45000 || 20000
    3 || 35000 || 10000
    I got some problem cause I had the 100 000 in my previous year (Ago) and I don’t want it because it was ordered after 1/1/2009 (Previous year). I know that the ago function concerns the Sum of Amount by Delivered Date, Year -1 ...
    Does somebody has a solution for this ? Thank you

    Hi,
    The problem is that I only know the offset values at row level, i.e., when I run my answer report some records use a certain offset value (offset1) while others use another offset value (offset2)
    The offset value can be determinate by a logical column.
    Is it possible?
    Thanks.

  • Ago Function

    Hi all
    I upgraded from 10g to 11g and now my Ago function seems to not be working but i have no idea why.
    The data is basically coming from a table like so:
    AcctNbr EffDate Balance
    12345 01/01/2010 $200
    12345 01/02/2010 $205
    12345 01/01/2011 $206
    12345 01/02/2011 $207
    So you can see that I have a balance amount for each day of the year.
    So What I am trying to do is get the Year Ago amount.
    I have this table joined to a basic time dimension table. Year > Quarter > Month > Week > Day.
    In 10g I created a logical column using this and it worked fine:
    AGO("LDW"."FA_ACCTBAL"."NOTEBAL", "LDW"."DimTime"."Year", 1)
    In 11g I get no results. The log file says it my YAGO Measure is being converted to a null. (converted to NULL because its grain is below query's grain.)
    SELECT s_0, s_1, s_2, s_3, s_4, s_5, s_6 FROM (
    SELECT
    0 s_0,
    "LDW"."FA_ACCTBAL"."EFFDATE" s_1,
    CASE WHEN "LDW"."FA_ACCTBAL"."MAJOR" ='CK' THEN 'Chequing'
    WHEN "FA_ACCTBAL"."MAJOR" ='TD' THEN 'Term Deposit'
    WHEN "FA_ACCTBAL"."MAJOR" ='SAV' THEN 'Savings'
    WHEN "FA_ACCTBAL"."MAJOR" ='MTG' THEN 'Mortgage'
    WHEN "FA_ACCTBAL"."MAJOR" ='CNS' THEN 'Consumer'
    WHEN "FA_ACCTBAL"."MAJOR" ='CML' THEN 'Commercial' END s_2,
    "LDW"."FA_ACCTBAL"."% Chg YAGO Notebal" s_3,
    "LDW"."FA_ACCTBAL"."Chg YAGO Notebal" s_4,
    "LDW"."FA_ACCTBAL"."NOTEBAL" s_5,
    "LDW"."FA_ACCTBAL"."YAGO Notebal" s_6
    FROM "LDW"
    WHERE
    ((FA_ACCTBAL.MAJOR IN ('CML', 'CNS', 'MTG')) AND (((FA_ACCTBAL.EFFDATE IN (current_date-1)) OR (FA_ACCTBAL.EFFDATE IN (current_date-366)))))
    ) djm ORDER BY 1, 3 ASC NULLS LAST
    [2011-03-23T21:51:55.000+00:00] [OracleBIServerComponent] [TRACE:7] [USER-23] [] [ecid: 0000Iv^gxcn99hWjLxMMOA1DX^y9000GDt] [tid: 1b6c] [requestid: 5df40012] [sessionid: 5df40000] [username: Administrator] -------------------- General Query Info: [[
    [2011-03-23T21:51:55.000+00:00] [OracleBIServerComponent] [TRACE:7] [USER-52] [] [ecid: 0000Iv^gxcn99hWjLxMMOA1DX^y9000GDt] [tid: 1b6c] [requestid: 5df40012] [sessionid: 5df40000] [username: Administrator] -------------------- Expression 'Ago(NOTEBAL:[DAggr(FA_ACCTBAL.NOTEBAL)], [Level Year], 1)' converted to NULL because its grain is below query's grain.
    [2011-03-23T21:51:55.000+00:00] [OracleBIServerComponent] [TRACE:7] [USER-52] [] [ecid: 0000Iv^gxcn99hWjLxMMOA1DX^y9000GDt] [tid: 1b6c] [requestid: 5df40012] [sessionid: 5df40000] [username: Administrator] -------------------- Expression 'Ago(NOTEBAL:[DAggr(FA_ACCTBAL.NOTEBAL)], [Level Year], 1)' converted to NULL because its grain is below query's grain.
    [2011-03-23T21:51:55.000+00:00] [OracleBIServerComponent] [TRACE:7] [USER-52] [] [ecid: 0000Iv^gxcn99hWjLxMMOA1DX^y9000GDt] [tid: 1b6c] [requestid: 5df40012] [sessionid: 5df40000] [username: Administrator] -------------------- Expression 'Ago(NOTEBAL:[DAggr(FA_ACCTBAL.NOTEBAL)], [Level Year], 1)' converted to NULL because its grain is below query's grain.
    [2011-03-23T21:51:55.000+00:00] [OracleBIServerComponent] [TRACE:7] [USER-52] [] [ecid: 0000Iv^gxcn99hWjLxMMOA1DX^y9000GDt] [tid: 1b6c] [requestid: 5df40012] [sessionid: 5df40000] [username: Administrator] -------------------- Expression 'Ago(NOTEBAL:[DAggr(FA_ACCTBAL.NOTEBAL)], [Level Year], 1)' converted to NULL because its grain is below query's grain.
    [2011-03-23T21:51:55.000+00:00] [OracleBIServerComponent] [TRACE:7] [USER-52] [] [ecid: 0000Iv^gxcn99hWjLxMMOA1DX^y9000GDt] [tid: 1b6c] [requestid: 5df40012] [sessionid: 5df40000] [username: Administrator] -------------------- Expression 'Ago(NOTEBAL:[DAggr(FA_ACCTBAL.NOTEBAL)], [Level Year], 1)' converted to NULL because its grain is below query's grain.
    [2011-03-23T21:51:55.000+00:00] [OracleBIServerComponent] [TRACE:7] [USER-52] [] [ecid: 0000Iv^gxcn99hWjLxMMOA1DX^y9000GDt] [tid: 1b6c] [requestid: 5df40012] [sessionid: 5df40000] [username: Administrator] -------------------- Expression 'Ago(NOTEBAL:[DAggr(FA_ACCTBAL.NOTEBAL)], [Level Year], 1)' converted to NULL because its grain is below query's grain.
    Any idea what has happened here?

    Hi,
    I'm facing the same issue. Did you find a solution for this problem?
    Thx
    Jan

  • Ago function not working properly with time dimension

    Hi all,
    In OBIEE 11g we have the following issue:
    We have a fact which contains transaction's sum for the last day of each month.
    We use ago function like this : ago(<fact.column>,1)When we want to see the result from the time hierarchy the fact with the ago function works properly for quarters and half years but for the months shorter than the previous one can't take the right value /equals to NULL/.
    For example :
    sum for YEAR: 10000
    sum for Half Year 1 : 4000
    sum for Half Year 2 : 6000
    sum for Quarter 1: 1000
    sum for Quarter 2: 3000
    sum for Quarter 3: 2000
    sum for Quarter 4: 4000
    sum for month... - here the ago function is confused with the last day of previous month if it's shorter than itself: For example - for march it cannot take value for end of February ..etc.
    Any ideas?
    Thanks in advance,
    Alexander.

    Hi,
    I faced some issues previously with month, so I used month+year as id instead of month id. Instead of tragging month id 1-12 into your hierarchy, create another column into your table like month+year - 201201, 201202 which creates unique month_year_id and drag this column into month level instead of month_id. So the problem might be solved.
    Regards,
    Anitha.B

  • Proper use of AGO function

    Dear All,
    I have to report on cubes that have their data aggregated on the day level. Standard reporting works fine. Now I want to do some historic comparison. I therefore created some calculation columns in Administrator, e.g.
    AGO(fact, dim_time.month,1)
    which shall give me the value of the fact just one month (and quarter and year in other columns) ago. If I report this on a daily basis, e.g day, fact, fact_month_ago I can see the report and calculation is correct, fact_month_ago is exactly the sam as fact from one month ago.
    But now I start to aggregate such a report to the month level (in Answers). So the report is month, fact, fact_month_ago. Now, some months are correct some are different. Looking deeper into this I assume this belongs to the number of days in a month. February has 28 days, so in the monthly report 28 lines are aggregated, even for the fact_month_ago table.
    In this case month_ago is January, which has 31 days, but 29 to 31 are not aggregated, as the report goes only from feb 1st to feb 28th.
    In the end the sum of the month_ago calculation is unequal to the sum of the last month.
    Does this mean I cannot use AGO function to calcualte things like that, or is there any trick or other function that would help here ?
    Regards,
    Knut

    You can have problem if you are going in a lower level such as week or date but if you stay on the month level, normally you must have the good result.
    Check here to have an example of this problem:
    http://obiee101.blogspot.com/2009/01/obiee-leap-year-challenge.html
    Otherwise, check your set up:
    http://gerardnico.com/wiki/dat/obiee/bi_server/design/dimension/time_dimension_parameters_for_ago_and_td_functions#timecalender_dimension_design_verification
    See each punt that are listed under the paragraph Time/Calender Dimension Design Verification. A good time dimension is the key for a good result with the time series function.
    Cheers
    Nico

  • Problem using Ago function

    Hi all,
    My problem is that when i use ago function it displays next months value for example first column shows balance of april month and next to it ago column displays balance of the may not march. I am really confused. Please help,
    AGO(SR02BriefIncome.sr02_cube.BALANCE, SR02BriefIncome.timesDim."times Detail", 1);

    Hi Nico,
    Another question in relation to Ago function; I need to get value/balance a year ago which is 12 months ago, and also previous year's last months balances; the problem is that Ago function takes only integer, I have tried to put a variable, Is there is way i can get balances of the previous year's last month because it will be much easier to get it using built-in ago function.
    Also i need help with your answer for thread How to use row values in Presentation or Administration for calculation
    Re: How to use row values in Presentation or Administration for calculation
    "Yes, I forgot this one. Of course, this solution work when you have a pivot column.
    If you talk about period to period comparison, really often I must do a share like this one : ($2-$5)/$5.
    And unfortunately, this is not possible in a calculated item. Is it ?"
    We have a lot of reports with inter-row calculations, we have already used a lot sql model but we would like use answer also. Can u explain it with exact examples or steps.
    thank you again,

  • Unable to create time series ago function

    Hello guys
    I am running into a problem about time series function, ago function
    I have a simple schema, fact <---->Time dimension
    I have created time dimension hierarchy where month is the lowest level, I have also made it "time dimension" and month is the "chronogical key"..
    When applying ago function, I am putting my measure from the fact table, level as "month" from time dimension table, and 1 meaning 1 month ago, when I complile it, I get the following error:
    [nQSError: 27009] Unresolved identifier: "FTTNBILLSUM"."FTTNOBIEEBILLTIME"."Month".
    Could anybody help me out as what the system doesn't like about this column?
    Thanks

    Thanks Maden
    I did the correction and now it's giving a different error: [nQSError: 22038] Function AGO requires at least one measure attribute in its first argument.
    My code is:
    Ago("FTTNBILLSUM"."F_Bill_Sum"."ATM_UNITS_Sum" , "FTTNBILLSUM"."D_Time"."Month" , 1)
    I have time hierarchy that names: D_Time with Month at the lowest level with Chrono keys, there is no level above it except grand total level, so only 2 level hierachy
    I have a fact table that is F_Bill_Sum, which is join to D_Time... I made the D_time both the name of table and hierarchy
    Please let me know what this error is coming from
    Thanks

  • Ago function - Aggrgate Table.

    Hi , tnks in advance for your replies.
    I have one aggregate table(created in by db oracle 10g/r2) where i have the sum of "qty" and "sale_price" in a level of month.
    I have a calendar dimension --->year->half->quarter->month(where month is my lower level) in my business level.
    i created the appropriate logical columns with the ago function for each(year ago....) in administrator tool
    Everything is ok for the "year-half-quarter" but when i try to create a report with my lowest dimension "month" , it is created the following nqserror :
    Κατάσταση: HY000. Κωδικός: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46036] Internal Assertion: Condition !levelJoinNodes.empty(), file .\Src\SQONPathJoinConstructor.cpp, line 922. (HY000)
    Any ideas?
    tnks...

    Tnks one more time for your response.
    I checked everything again and "believe" that everything is ok.
    I made a simple report with 3 collumns
    One for moth,quantity and -quantity last month-
    I checked in the session
    -------------------- Logical Request (before navigation):
    RqList
    MCALENDAR.Μήνας as c1 GB,
    Ago(Ποσότητα:[DAggr(MFACT.Ποσότητα by [ MCALENDAR.Μήνας] SB Month)], [Level Month], 1) as c2 GB,
    Ποσότητα:[DAggr(MFACT.Ποσότητα by [ MCALENDAR.Μήνας] )] as c3 GB
    OrderBy: c1 asc
    +++Administrator:2d0000:2d0003:----25/03/2009 20:42:57
    -------------------- Query Status: Query Failed: [nQSError: 46036] Internal Assertion: Condition !levelJoinNodes.empty(), file .\Src\SQONPathJoinConstructor.cpp, line 922.
    where in greek:
    month = Μήνα
    quantity = Ποσότητα
    year = Έτος
    i tried the same report after adding one more column at the end,the column year.
    the result was ok.
    -------------------- Sending query to database named monthly (id: <<142688>>):
    WITH
    SAWITH0 AS (select Case when T36043.YEAR_MONTH is not null then DENSE_RANK() OVER ( ORDER BY T36043.YEAR_MONTH ASC NULLS LAST ) end as c1,
    T36043.YEAR_MONTH as c2
    from
    dwadm.MCALENDAR T36043),
    SAWITH1 AS (select distinct SAWITH0.c1 + 1 as c1,
    SAWITH0.c2 as c2
    from
    SAWITH0),
    SAWITH2 AS (select Case when T36043.YEAR_MONTH is not null then DENSE_RANK() OVER ( ORDER BY T36043.YEAR_MONTH ASC NULLS LAST ) end as c1,
    T36043.YEAR_MONTH as c2,
    T36043.YEAR_NUM as c3
    from
    dwadm.MCALENDAR T36043),
    SAWITH3 AS (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3
    from
    (select sum(T34542.MQTY) as c1,
    SAWITH2.c2 as c2,
    SAWITH2.c3 as c3,
    ROW_NUMBER() OVER (PARTITION BY SAWITH2.c2 ORDER BY SAWITH2.c2 ASC) as c4
    from
    dwadm.MFACT T34542,
    SAWITH1,
    SAWITH2
    where ( T34542.YEAR_MONTH = SAWITH1.c2 and SAWITH2.c1 = SAWITH1.c1 )
    group by SAWITH2.c2, SAWITH2.c3
    ) D1
    where ( D1.c4 = 1 ) ),
    SAWITH4 AS (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3
    from
    (select sum(T34542.MQTY) as c1,
    T36043.YEAR_MONTH as c2,
    T36043.YEAR_NUM as c3,
    ROW_NUMBER() OVER (PARTITION BY T36043.YEAR_MONTH ORDER BY T36043.YEAR_MONTH ASC) as c4
    from
    dwadm.MCALENDAR T36043,
    dwadm.MFACT T34542
    where ( T34542.YEAR_MONTH = T36043.YEAR_MONTH )
    group by T36043.YEAR_MONTH, T36043.YEAR_NUM
    ) D1
    where ( D1.c4 = 1 ) )
    select distinct case when SAWITH4.c2 is not null then SAWITH4.c2 when SAWITH3.c2 is not null then SAWITH3.c2 end as c1,
    SAWITH3.c1 as c2,
    SAWITH4.c1 as c3,
    case when SAWITH4.c3 is not null then SAWITH4.c3 when SAWITH3.c3 is not null then SAWITH3.c3 end as c4
    from
    SAWITH3 full outer join SAWITH4 On nvl(SAWITH3.c2 , 'q') = nvl(SAWITH4.c2 , 'q') and nvl(SAWITH3.c2 , 'z') = nvl(SAWITH4.c2 , 'z')
    order by c1, c4
    result
    month     qty last moth     qty month year
    2007/01          661,516.56     2007
    2007/02     661,516.56     786,911.55     2007
    2007/03     786,911.55     1,282,058.63     2007
    2007/04     1,282,058.63     1,389,586.66     2007
    2007/05     1,389,586.66     1,981,459.98     2007
    2007/06     1,981,459.98     2,393,482.06     2007
    2007/07     2,393,482.06     3,181,910.59     2007
    2007/08     3,181,910.59     3,736,296.87     2007
    2007/09     3,736,296.87     2,208,069.30     2007
    2007/10     2,208,069.30     1,536,717.72     2007
    2007/11     1,536,717.72     961,400.41     2007
    2007/12     961,400.41     985,445.45     2007
    2008/01     985,445.45     924,097.26     2008
    2008/02     924,097.26     895,622.24     2008
    tnksss

  • AGO function seems to ignore filter

    I have a column that uses the ago function to calculate the value from a week ago for certain hours that are considered "high traffic". I'm trying to get the average of these high traffic hours this week and last week, but the ago function seems to be ignoring the ON/OFF Peak filter and is returning the average for all hours, see formula below:
    AGO(FILTER("- DA_LMP_prelim"."DA LMP" USING ("Time_dimension"."On off peak" = 'ON')) , "Time_dimension"."Time_dimensionDim"."Week", 1)
    Is it documented somewhere that AGO will "ignore" filter functions?

    Trouble shoot in this way:
    1.What level is your AGO? Is it YearAGO,Month AGO or weekAGO? -- Go to RPD - AGO Columns Check the fx..what is the level?
    2. You have Calendar prompt on date. which means you are looking for one day AGO value. in that case AGO function should be at daylevel.
    3. What are the columns in your report?

  • AGO functions with diferent time attibutes

    i have problem! i have too columns Year ago and month ago. When i take these columns with Month i can see only results from Month Ago (Year ago is no results), but when i take year and year ago i can see results from year ago. How can ia see year ago results with month column?????
    My Ago functions :
    Month ago: Ago("RU"."FSG fact - Budget"."Budget sum" , "RU"."WH Dim - TimeDim"."period" , 1) period is like (2008.01; 2010.02; ....)
    Year ago: Ago("RU"."FSG fact - Budget"."Budget sum" , "RU"."WH Dim - TimeDim"."Year" , 1) year is like (2008; 2010;....)
    please help !!!!!

    For Month_Ago column i set level Period and for Year_Ago level Year! but i still get problem - when i take fact column with MonthAgo and YearAgo columns and Month column from time dimension, MonthAgo works fine, but YearAgo shows '0' in all months and in the end of table after last moth shows all sum by year !
    and i have also Time dimension made from 2 Logical source tables!
    when i use grand total level i get error massege:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22047] The Dimension used in Ago function must be referenced in the query. (HY000)

  • AGO function is not returning value in OBIEE 11g

    I have 2 tables FIN_MASTER AND FIN_TRANS. 
    FIN_MASTER  is having the following fields org_code, type_code, vr_no, vr_Date, pay_to .FIN_TRANS is having the columns org_code, type_code, vr_no, acct_code. debit, credit.
    PK of FIN_MASTER is org_code, type_code, vr_no
    PK of FIN_TRANS is org_code, type_code, vr_no, acct_code
    I have imported these two tables in to physical layer and created join between these two tables on the following keys. org_code, type_code, vr_no. Then i dragged these two to BMM layer. Now i created 3 new logical columns in DIM_FIN_MASTER as year, quarter, month. These 3 columns are created using the functions year(vr_date), month(vr_date), quarter_of_year(vr_date). Then i created a dimension heirarchy called TIME( structure type is TIME) from this DIM_FIN_MASTER. and set chronological key on month level. Then I applied the AGO function on debit column with month level. After that, repository is uploaded and BI server is restarted. Now amount is not displaying in AGO function column in analytics. That column is appearing as empty. 
    Please advise me.

    Here is the dirty fix, I'm heading off to sleep.
    If the function CurrentAdId doesn't return a number, then
    this will ensure it returns 0 (prevents your error, may not display
    an ad):
    <CFFUNCTION
    NAME="CurrentAdId"
    ACCESS="Private"
    RETURNTYPE="numeric"
    HINT="For internal use. Returns the Id of the current ad in
    rotation.">
    <!--- Return the adId from the current row of the
    GetAdIds query --->
    <cfset var returnVal = ListGetAt(THIS.AdList,
    THIS.CurrentListPos)>
    <cfif NOT IsNumeric(returnVal)>
    <cfset returnVal = 0>
    </cfif>
    <CFRETURN returnVal>
    </CFFUNCTION>

  • AGO function in OBIEE

    Hi,
    I am creating a new logical column on my fact table and would like to use time series function(AGO) to compare trends a month ago. I have a time dimension too.
    I am using this expression defined in the new logical column properties:
    Ago("HCBF"."Workflow Fact"."Total Case Handlers" , "HCBF"."Time"."Month of Year" , 1)
    I get the following error message:
    [nQSError: 27009] Unresolved identifier: "HCBF"."Time"."Month of Year".
    The function expression appears to be fine, month of year is numeric and total case handlers is a count.
    Can anybody help resolve this error message.
    Thanks

    Hi,
    An issue remains with the AGO function in BI Answers, when I try to run a report in answers with the new column created in the fact table I get the following error in the log file:
    Query Status: Query Failed: [nQSError: 22040] To use AGO function, the storage level of the query ('[Time.Dimension Key]') must be a static level.
    I am selecting month name(Filtered on May 2010) and choosing fact measures(total cases, lastmonthcases). lastmonthcases is the new logical column created using AGO function.
    Does this error look familiar, there is a time dimension key in the logical time dimension table but this is not referenced in the hierarchy.
    Thanks

Maybe you are looking for

  • Using Time Machine to backup FROM a network drive

    Can time machine be configured to backup files that are stored on a network drive? Drive is mounted via SMB. Thanks Simon

  • Runtime error: Creating a simple resource in a CM repository

    Hi All,      I am trying to create a simple Resource & a collection in a CM repository without properties.      <b>The list of my imports is as follows:</b> import com.sapportals.htmlb.event.Event; import com.sapportals.htmlb.page.DynPage; import com

  • In Query of Query, can't use LEFT() function?

    Hi All, I've got an LDAP query that I use for our employee directory. I then do a Query of Queries and do LEFT(SN,1) to separate out by first character of last name [A,B,C,D,E...] etc. I had this working just fine in Railo CFM, but now I'm using Adob

  • E72 and Gmail problem (I can't receive new mail)

    Greetings, I hava Gmail account set up in my Nokia E72. I can send mail and I can receive mail which is dated till 23.02.2010. Mail that came in my inbox after that date and new mail I can not receive on E72. What could be a problem?

  • Lenovo u400 missing one recovery partition

    I had to change my ssd, and my okr partition is gone, is there a way to recover it?, i can't get the m-gpu drivers to work, Lenovo Ideapad U400 Windows 7 HomePremium 64 bit SP1