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,

Similar Messages

  • Problem with AGO function in OBIEE

    Hi I am new to OBIEE,
    I am working on Trend Analysis of ETL Mappings,
    I am using AGO Function to get the Previous day Elapse Time of a mapping but while generating the report its behaving in a strange way.
    like
    AGO("BI Performance"."Map Val Fact"."Elapse Time Minutes","BI Performance".ETLStartDim."Day",1) -- Day Ago Elapse time
    AGO("BI Performance"."Map Val Fact"."Elapse Time Minutes","BI Performance".ETLStartDim."Day",2) -- Two Day Ago Elapse time
    For example, in database there is date like
    Date Elapse Time
    2nd June 10 min
    1st June 11 min
    30th may 10 min
    My date in Report should be like
    Date Elapse Time Day Ago Elapse Time Two Day Ago Elapse Time
    2nd June 10 11 10
    But the date coming over here is
    Date Elapse Time Day Ago Elapse Time Two Day Ago Elapse Time
    2nd June 10
    3rd June 10
    4th June 10
    So if any one could help me out of this, it would of great help.
    With Regards
    Chaitanya

    This is posted to the incorrect forum. Please post to an OBIEE forum.

  • Error while using Ago function

    hi all,
    OBI 11.1.1.7.1
    I am unable to view data on result tab. No value returned in Calcutated Attribute. Please Help
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22040] To use Ago function, the storage level of the query ('[Time Dim.PAY_DT]') must be a static level.Please have your System Administrator look at the log for more details on this error. (HY000)
    Regards,
    Nivedita

    Substr("Fin Account".ASSET_NUM, 1, instr(Fin Account".ASSET_NUM, ':')+1)
    or
    Substr("Fin Account".ASSET_NUM, instr(Fin Account".ASSET_NUM, ':')+1,50)
    i think you should use 3 parameters, did you try that if it would work?
    additionally check what is the default format of your data: go to column properties -> data format; if its text then ok; otherwise you will have to cast the number to char; in such a case the above could be:
    Substr(cast("Fin Account".ASSET_NUM as char(20)), 1, instr(cast(Fin Account".ASSET_NUM as char(20)), ':')+1)
    or
    Substr(cast("Fin Account".ASSET_NUM as char(20)), instr(cast(Fin Account".ASSET_NUM as char(20)), ':')+1,50)
    Edited by: UserMB on Jun 25, 2009 6:17 AM

  • Problem using two function based indexes at once!

    Hello Oracle!
    I've got problems using two function based indexes on geometries at once.
    The problem occures, when I use a spatial join between two geometries both using function based indexes.
    The test case:
    CREATE TABLE quad (centroid NUMBER);
    CREATE TABLE points (no NUMBER, point MDSYS.SDO_GEOMETRY);
    CREATE OR REPLACE FUNCTION getQuad (centroid NUMBER) RETURN MDSYS.SDO_GEOMETRY DETERMINISTIC IS
    BEGIN
    RETURN MDSYS.SDO_GEOMETRY(2003, NULL, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(centroid-5,centroid-5,centroid+5,centroid-5,centroid+5,centroid+5,centroid-5,centroid+5,centroid-5,centroid-5));
    END;
    INSERT INTO USER_SDO_GEOM_METADATA VALUES('quad','tiedge.getQuad(centroid)',MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X', -100, 100, .0000001), MDSYS.SDO_DIM_ELEMENT('Y', -100, 100, .0000001)),NULL);
    CREATE INDEX quad_idx on quad(getQuad(centroid)) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    INSERT INTO quad VALUES (0);
    INSERT INTO quad VALUES (5);
    INSERT INTO quad VALUES (10);
    INSERT INTO points VALUES (1, MDSYS.SDO_GEOMETRY(1001,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1),MDSYS.SDO_ORDINATE_ARRAY(4,4)));
    ALTER SESSION SET QUERY_REWRITE_INTEGRITY=TRUSTED;
    ALTER SESSION SET QUERY_REWRITE_ENA[i]Long postings are being truncated to ~1 kB at this time.

    hi there,
    For a better audience for this question, I'd look at the database forum.
    guys on that will be a lot more familiar with FBIs
    thanks
    Barry

  • Problem using LIKE function

    Hi Guyz,
    I am having small problem using LIKE function . The problem is I am using LIKE function in the WHERE clause
    to compare a column to a particular value, which gets this value from the front end. If the user has a single quote in the string he entered then the LIKE function is not working because of the single quote. Is there any way I can escape the single quote like we escape '%' and '_'.
    Thankyou.

    Mod_plsql supports bind variables, as do almost all front-end tools that deal with Oracle (and most other databases). I do not code mod pl/sql myself, but others here do, and I see bind variables in their code all the time (if I don't, they hear from me :-)).
    If you pass a bind variable, the quote problem goes away. As far as I know (which is not very far), you should be able to take the string with the quote directly from your input field, bind it to the variable in your query and have no problems.
    I suspect that the reson you are having issues is that you are just gluing strings together to create a sql statement. this is the wrong approach.
    The java term for what you are looking for is prepared statement, I'm not sure what the equivalent is i mod plsql, but that should give you a start.
    John

  • How can I use AGO function with aggregates

    I use aggregated table and a detailed table
    I have time hierarchy whose lowest level is date. For sales I
    created year-to-year (YTD) comparision with AGO function. It
    works OK.
    BUT, I want to speed it up, so I used aggregates. I created new
    time table grouped by MONTH and corresponding agg_SALES table. I
    created connections and mapped the fields. It works OK for
    normal queries, that means my queries at month level use
    aggregates. BUT when I add YTD measures or YAGO measure in query, it goes to
    then SALES table whose grain is date.
    How can I force BI Server to use AGO function with aggregates?
    I use OBIEE 10.1.3.4
    Thank you
    Ishaq
    (Question originally taken from ITtoolbox and posted by Gorazd)
    SORRY - THE QUESTION IS IN THE WRONG FORUM
    Edited by: ishaq12 on Nov 19, 2008 12:21 PM

    Hi,
    you can not do it in Administration tool but you can set agregation for that field in Answers (fx->Agregation rule->Sum) and effect should be the same. Note that it may not work properly on Oracle 10g as generated SQL is not 100% recognized, on 11g everything is OK (at least in my case).
    Regards,
    Marko
    Edited by: user10449532 on 2008.11.19 06:29

  • Using AGO function with partitions

    I have a situation where we have logical sources with the same repository folder that are partitioned. We would like to use the AGO function but are getting the following error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22042] AGO function may not be used on '# Applied Invoices' because its source is horizontally partitioned. (HY000)
    Has anyone had success using the AGO function with partitions? If not, do you have an alternate solution to the problem?

    AGO doesn't work with partitions - it's documented on metalink....there's an enhancement request , but that's it - no work-around provided....I'd suggest creating a common view for that particular report

  • How to use Ago function in BIEE with mysql database

    Hi experts,
    Ago function works well in Oracle database,but when I tried a mysql database,it didn't show results as expected. Anyone knows how to use Ago with mysql as data source?

    Hi Gurus, need help

  • Problem using jolt function checkAuthentication. chkauth:J_CHECKAUTH FAILED

    Hi, I'm using jolt 8.1.
    When I attemp to chek security requirements using the function checkAuthenticationLevel() of the class JoltSessionAttributes it gives an error.
    I have previously setted the address:
    JoltSessionAttributes = new JoltSessionAttributes();
    sattr.setString(JoltSessionAttributes.APPADDRESS, "//50.88.43.237:6005");
    sattr.checkAuthenticationLevel();
    Then it fails:
    bea.jolt.SessionException: Cannot connect to any //50.88.43.237:6005.
    Reason:NwHdlr: Network Error: chkauth: J_CHECKAUTH FAILED
    Any idea? thx.

    Hi,
    I was facing a similiar problem but when i changed the port number it didnot give me this error but now its giving me bea.jolt.ServiceException:Service is not available:GETKEYS.
    Can you help me solve this

  • Problem using MDX functions in Answers Filter

    I'm using OBIEE 10.1.3.2.
    I'm using an Essbase cube as my datasource (aggregate storage).
    My level 0 members in my Date dimension are of the format yyyy-mm-dd (e.g., 2011-08-13)
    I have a dashboard prompt selecting the date from a calendar which returns the date and time (yyyy-mm-dd hh:mm:ss). So naturally I can't do just a straight equals between the prompt value and the member value.
    What I've written in the filter sql in Answers is: Date.Days = Evaluate('SUBSTRING(%1,1,10)','@{varStartDate}')
    The log shows the following:
    -------------------- SQL Request:
    SELECT Date.Days saw_0, main.total_completed_orders saw_1 FROM SIKAgg2 WHERE Date.Days = Evaluate('SUBSTRING(%1,1,10)','2011-08-09 00:00:00') ORDER BY saw_0
    -------------------- Sending query to database named mezen (id: <<9648>>):
    With
    set [Date4] as 'Filter([Date].Generations(4).members, (([Date].CurrentMember.MEMBER_ALIAS = "2011-08-09 00:00:00" OR [Date].CurrentMember.MEMBER_Name = "2011-08-09 00:00:00")))'
    select
    { [Measures].[total_completed_orders]
    } on columns,
    NON EMPTY {SUBSTRING(,1,10)SUBSTRING(,1,10)SUBSTRING(,1,10){[Date4]}} properties ANCESTOR_NAMES, GEN_NUMBER on rows
    from [SIKAgg2.main]
    So with all that being said it doesn't appear that the MDX function SUBSTRING is actually doing anything.
    1) Am I using the function incorrectly?
    2) Is there a better way to do this? I really just need to get rid of the time portion of the variable from the date prompt.
    Any help/guidance would be greatly appreciated. Spending too much time with trial and error approach.
    Thanks,
    Brad

    Brad,
    Try this way..In OBIEE RPD - Physical Layer for level 0 members in my Date dimension. Double click this member and check its type. Change the type to 'DATE' from 'DATETIME'. Delete the Date Dimension in BMM layer & Presentation Layer for again drag and drop from Physical Layer after changing the Type in physical layer.
    Normal way of building the RPD using Essbase
    Something similar to this http://www.rittmanmead.com/2009/03/dates-timestamp-and-oracle-bi-answers-filters/
    This shud solve your timestamp problem everywhere. This is one of the most common problem for Oracle sources. I have essbase as a source but unfortunately I can't replicate it as this is not having time level.
    Let me know if this solves your problem...
    In case the type is DATE only in RPD then I'll try to provide a diff soln here.
    Hope this helps

  • Problem using extract function (PL/SQL) with "&#34"

    Hi,
    When I use extract function (PL/SQL), it does not transform well "&#34". Insted of returning ' " ' , it returns ' &quot '.
    I know this works changing the code replacing xml.extract for SELECT extractvalue(xml,'//A/text()') into v from dual;
    But Is there another way to do this using PL/SQL? any patch, option..?
    Regards

    Had to use my website to demonstrate the code...
    As said, whatever I try here the code gets automatically converted...
    See for answer on your question: http://www.liberidu.com/blog/?p=635

  • Turkish Character Problem using GO function

    Hi,
    We have a requirement of opening new dashboard page as a new page when a link is followed in an analytical request. We are using GO function and we are passing parameters also.
    Our formula for the column producing the link is like following (I have to drop html tags as they are not rendered on the forum page):
    saw.dll?Go&_scid=WAP*ginmv-g&Path=/shared/ASGBOARD/KRN_ISL/DENEME_ISL&Action=Navigate&P0=1&P1=eq&P2=ISLETME_DIM.SUBEKODU&P3=1+"@"&Done=Close
    The parameters are coming from primary request columns. However, if those parameters contain turkish characters like ş ç ö ü etc. the parameters are not passed correctly to the target dashboard page, instead of those characters, an empty box is rendered and the data on the page is not filtered correctly.
    Any idea on this?
    Thanks

    Hi,
    I am also not sure whether this is somehow because of OC4J settings or Oracle BI settings.
    Thanks

  • Compilation problems using NVL function in Pro*C subselect

    I have come across a weird oracle problem. When I execute the following query in SQLPlus it works but when
    I include it in Pro*C code in a EXEC SQL statement it gives syntax errors and fails to compile. Any idea what I am doing wrong.
    SELECT DISTINCT
         A.ID_PERSON,
         C.ID_STAGE_PERSON_LINK ,
         A.NM_PERSON_FULL,
         A.NBR_PERSON_AGE,
         A.ADDR_PERSON_ST_LN_1,
         A.ADDR_PERSON_CITY,
         A.ADDR_PERSON_ZIP,
         A.CD_PERSON_STATE,
         A.CD_PERSON_COUNTY,
         A.NBR_PERSON_PHONE,
         C.CD_STAGE_PERS_REL_INT
         FROM
              PERSON A,
              STAGE_PERSON_LINK C
         WHERE
         C.ID_CASE = 88776721
         AND          A.IND_INVALID_PERS IS NULL
         AND          C.CD_STAGE_PERS_TYPE = 'PRN'
         AND          C.ID_PERSON = A.ID_PERSON
         AND C.ID_STAGE_PERSON_LINK =
    NVL (
                   (SELECT MAX(F.ID_STAGE_PERSON_LINK)
                   FROM STAGE_PERSON_LINK F
                   WHERE F.ID_PERSON=C.ID_PERSON
                   AND F.ID_CASE = C.ID_CASE
                        AND F.CD_STAGE_PERS_TYPE = 'PRN'
                        AND F.CD_STAGE_PERS_REL_INT IS NOT NULL)
                   (SELECT MAX(G.ID_STAGE_PERSON_LINK)
                   FROM STAGE_PERSON_LINK G
                   WHERE G.ID_PERSON=C.ID_PERSON
                   AND G.ID_CASE = C.ID_CASE
                        AND G.CD_STAGE_PERS_TYPE = 'PRN')
    AND A.ID_PERSON NOT IN
    SELECT S.ID_PERSON
    FROM STAGE_PERSON_LINK S,STAGE T
    WHERE S.ID_CASE = C.ID_CASE
    AND S.ID_CASE = T.ID_CASE
    AND S.ID_STAGE = T.ID_STAGE
    AND T.CD_STAGE &lt;&gt; 'INT'
    MINUS
    SELECT H.ID_PERSON
    FROM STAGE_PERSON_LINK H, STAGE F
    WHERE H.ID_CASE = F.ID_CASE
    AND H.ID_STAGE = F.ID_STAGE
    AND H.ID_CASE = C.ID_CASE
    AND H.CD_STAGE_PERS_ROLE &lt;&gt; 'XE'
    AND F.CD_STAGE &lt;&gt; 'INT'
    This query returns data when run in sqlplus.When used in a Pro*C C program and compiled the precompiler complains with syntax errors when used with EXEC SQL DECLARE CLSS82D_CURSOR CURSOR FOR &lt; query above &gt;.However removing the NVL function and retaining the subselect clause compiles but that is not what I want to do.
    Syntax error at line 262, column 20, file clss82d.pc:
    Error at line 262, column 20 in file clss82d.pc
    SELECT MAX( F.ID_STAGE_PERSON_LINK )
    ...................1
    PCC-S-02201, Encountered the symbol "MAX" when expecting one of the following:
    ( ) * + - / . @ | at, day, hour, minute, month, second, year,
    The symbol "(" was substituted for "MAX" to continue.
    Syntax error at line 263, column 10, file clss82d.pc:
    Error at line 263, column 10 in file clss82d.pc
    FROM STAGE_PERSON_LINK F
    .........1
    PCC-S-02201, Encountered the symbol "FROM" when expecting one of the following:
    , ) * + - / | at, day, hour, minute, month, second, year,

    Pro*C works bit differently tha sqlplus. try removing the blank line after
    SELECT MAX(G.ID_STAGE_PERSON_LINK)
    FROM STAGE_PERSON_LINK G
    WHERE G.ID_PERSON=C.ID_PERSON
    AND G.ID_CASE = C.ID_CASE
    AND G.CD_STAGE_PERS_TYPE = 'PRN')
    good luck,
    Gauranga

  • Using AGO function in calculated fields in Analysis

    Oracle BI 11g.
    Hi!
    I have time-hierarchy and try to use function Ago in calculated fields. I created Analysis and add columns Year, Revenue, Revenue (1 year ago). In formula of column "Revenue (1 year ago)" I wrote:
    AGO("Sales"."Revenue", "H Calendar"."Year", 1)
    "H Calendar"."Year" - is level in my time Hierarchy "H Calendar".
    But when I clicked [OK], I got error: [nQSError: 27037] Unresolved level: "H Calendar"."Year".(HY000)
    What I do wrong?

    Hi,
    I think it's a bug, try this.
    If Analysis you have a time folder with this object dimension:
    Time Hierarchy
    Total Time
    Year
    Quarter
    Month
    Week
    Day
    And a measures 1- Revenue try to calculate the criteria like this (write in the level the formula "Time"."Time Hierarchy".Year)
    For example:
    AGO("Base Facts"."1- Revenue", "Time"."Time Hierarchy".Year,1)
    If you have the sample sales of the 11g installed try this on A - Sample Sales
    SELECT s_0, s_1, s_2 FROM (
    SELECT
    0 s_0,
    "A - Sample Sales"."Time"."T05 Per Name Year" s_1,
    AGO("A - Sample Sales"."Base Facts"."1- Revenue","Time"."Time Hierarchy"."Year",1) s_2
    FROM "A - Sample Sales"
    ) djm ORDER BY 1, 2 ASC NULLS LAST
    For me it works.
    Regards,
    Gianluca

  • The problem with AGO function

    Oracle BI 11g
    Hi!
    In repositiry I created time hierarchy:
    1. Year
    - YearID (Primary Key)
    - YearName (Use For display)
    1.1 Month
    - MonthID (Primary Key)
    - MonthName (Use For display, Sorted By MonthID)
    1.1.1 Date
    - DateID (Primary Key)
    - Date (Use For display, Chronological Key).
    After that I create calculated logical column "Revenue (1 year ago)": Ago("DB"."Table"."Revenue" , "DB"."Calendar"."Year" , 1)
    But when I use created column in Analysis, I get strange results (Date, Revenue, Revenue (1 year ago)):
    09.02.2007..........1000....................
    09.03.2007..........3000....................
    06.04.2007..........5000....................
    08.02.2008..............................1000
    07.03.2008..............................3000
    11.04.2008..............................5000
    As you can see dates in 2008 year are different that in 2007! Why it can be???
    Edited by: 849986 on 21.04.2011 6:01

    I thought that I made mistake when I created my repository or something else. But I got this problem in Oracle demo-repository SampleAppLite as well! I created Analysis: Calendar Date, Revenue, Year Ago Revenue:
    07.01.2008..........2167
    08.01.2008..........1920
    05.01.2009...........................2167
    06.01.2009...........................1920
    It's a bug in Oracle BI 11 or I do something wrong?

Maybe you are looking for