AGO function an date parametar in request

Hi all,
I have problem with this calculation that I had created in Admin.
*1. Mesure*
ToDate(sum(ifnull(TABLE.COLUMN1 , 0)), [Level Month])
*2.Mesure*
nullif( ifnull(Ago(sum(ifnull(TABLE.COLUMN2 , 0)), [Level Year], 1) , 0) , 0)
Calculation
+ToDate(sum(ifnull(TABLE.COLUMN1 , 0)), [Level Month]) / nullif( ifnull(Ago(sum(ifnull(TABLE.COLUMN2 , 0)), [Level Year], 1) , 0) , 0) * 100+
In Answers I have pivot table that has parameter date (ex. 11.08.2009) that user define in prompt (date filter in request is set to promted). When I use *1. Mesure* and *2.Mesure* it works fine, but when I use calculation I am getting error The Dimension used in AGO function must be referenced in the query. . I am able to fix it by adding Year and Month filter. Why it is not working just with Date?

What is the pivot report structure, culumns?
How did you create these three logical columns?
Measure 1 -> ToDate(sum(ifnull(TABLE.COLUMN1 , 0)), Level Month)
Measure 2 -> nullif( ifnull(Ago(sum(ifnull(TABLE.COLUMN2 , 0)), Level Year, 1) , 0) , 0)
Calculation -> ToDate(sum(ifnull(TABLE.COLUMN1 , 0)), Level Month) / nullif( ifnull(Ago(sum(ifnull(TABLE.COLUMN2 , 0)), Level Year, 1) , 0) , 0) * 100
By use existing logical columns as the source?
You put ifnull(TABLE.COLUMN2 , 0) in the expression instead of TABLE.COLUMN2 and then set aggregation to SUM in the logical column?
Regards
Goran
http://108obiee.blogspot.com

Similar Messages

  • Function Module to Delete ODS Data based on Request

    Hi All,
    Is there any specific function module to delete ODS data based on Request.
    I found the program RS_DEL_ODS_1 which is using the FM RSAR_ODS_API_DEL.
    But this FM is deleting the request at PSA level.
    Is there any alternate FM?Or is there any ABAP Program or so?

    Hi,
    Deletion of specific request is not perimitted for ODS objects. You can delete the most recent request, but if you delete any previous requests, all the requests up to that request will also be deleted.
    You can do it by write an ABAP program to identify the specific requests to be deleted for ODS.
    Regards
    CSM Reddy

  • 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 and To Date Functions together

    Hi here is my requirement, i wanted to create a column which captures previous year's Period to date.
    Period To Date gives value from 1st of this Period to today's date for present year 2012, but i want to capture the values from starting date of Period to today's date but for previous year 2011.
    If for example : Period 1 of 2012, prior period would be Period 1 of 2011
    I am assuming this logic will work,
    First i will capture Period To Date by using (To date function), and then use AGO function where Time Offset = Period and Number of Periods = 12.
    Please find the below function i used.
    Ago( ToDate("Core"."Fact - Sales - Invoice Line"."Net Invoiced Amount" , "Core"."Date"."Enterprise Period" ), "Core"."Date"."Enterprise Period" , 12) .
    But i found few inconsistency in the data, so kindly please help me in this.

    Try this.
    Instead of using 2 time series functions in one columns create separate columns
    ex:
    1. Create Prior YTD as :ToDate("Core"."Fact - Sales - Invoice Line"."Net Invoiced Amount" , "Core"."Date"."Enterprise Period" )
    2. Now create Ago column as : Ago (Prior YTD, "Core"."Date"."Enterprise Period" , 12)
    HTH

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

  • OBIEE 11.1.1.7-Ago Function Error-[nQSError: 46008] Internal error: File server\Query\Optimizer\SmartScheduler\PhysicalRequestGenerator\Src\SQOSPMarkMultiTargetSupport.cpp

    Hi All,
    I was performing the steps mentioned in Oracle Tutorial"http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11115/biadmin11g_02/biadmin11g.htm#t10"-BI RPD creation.
    After Using the AGO function data in the Time series metric(Month Ago Revenue) was null always. I updated the DB features in RPD physical layers by selecting support for time series functions.
    After that report started to fail with below error. Please let me know if its a bug and any option to fix it.
    Thanks,
    Sreekanth
    Error
    View Display Error
    Odbc driver returned an error (SQLExecDirectW). 
      Error Details
    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: 43119] Query Failed: [nQSError: 46008] Internal error: File server\Query\Optimizer\SmartScheduler\PhysicalRequestGenerator\Src\SQOSPMarkMultiTargetSupport.cpp, line 1680. (HY000) 
    SQL Issued: SELECT 0 s_0, "Sample Sales"."Time"."Year-L1" s_1, "Sample Sales"."Revenue"."Ago-Year Revenue" s_2, "Sample Sales"."Revenue"."Revenue" s_3 FROM "Sample Sales" FETCH FIRST 65001 ROWS ONLY
      Refresh

    I know that there is no relation between "SampleApp Lite"."D3 Orders (Facts Attributes)"."Order Date", "SampleApp Lite"."D0 Time"."Calendar Date", it's also the same thing in my own RPD.
    But as it's working with the 11.1.1.6.2 BP1 version I don't understand why it's not working with 11.1.1.6.9.
    Implicit fact column is not set on my repository, but I don't have any request with only dimensional column, so if my understanding is correct I don't need to use it. Also, the problem appears during the check of the repository not in answers.
    thanks anyway

  • Ago function not working in reports

    Hi
    I created a logical column using ago function,when I'm using this column in the report it throws the following error.I'm using 10.1.3.4.1 version of OBIEE.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    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 ('[TIMES.TIME_ID]') must be a static level. (HY000)
    SQL Issued: SELECT COUNTRIES.COUNTRY_NAME saw_0, SALES.AMOUNT_SOLD saw_1, SALES."Amount Sold LY" saw_2 FROM KNOWLEDGE WHERE (TIMES.CALENDAR_YEAR = 1999) ORDER BY saw_0
    Thanks
    Don.

    Hello Don,
    Have you set the chronological key for the time dimension ?
    Please refer the below post by Nico..
    http://gerardnico.com/wiki/dat/obiee/function_time?s[]=ago&s[]=function
    Same error it has been posted in below mentioned thread
    Re: Using the Ago Function
    One Request : Please if your post has been answered then please try to close the thread by awarding so that it can be helpful to others.
    thanks
    Edited by: user12116294 on Feb 4, 2011 5:18 PM
    Edited by: user12116294 on Feb 4, 2011 5:20 PM

  • 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

  • NQSError: 22047] The Dimension used in AGO function must be referenced

    Hi All,
    I am selecting the following columns in the report:
    1. Dimension.Product
    2. Sales: Directly mapped to physical datasource
    3. Prior Month Sales: calculated using the AGO function at the Month Level
    4. Var from Prior Month : Sales - Prior Month Sales (Calculated at the Logical Level)
    Time Dimensional Hierarchy is Year > Quarter > Month
    I am getting the data for the same but when I apply Grand Total is throws the error:
    nQSError: 22047] The Dimension used in AGO function must be referenced in the query. (HY000)
    When I use the filter for the Month filed it is coming up fine but when I remove the month filter and apply on Year it doesnt work.
    Can anybody please let me know how this works?

    This error is happening in request?
    You have to apply filter MONTH because you are calling month in AGO function. Try to create YEAR AGO calculation and then try combining filters, you will see that then YEAR will be important, not month.

  • How to handle data in a request object

    I want to know the best way to handle data received from sql query to display on a jsp page and for page navigation. If I store data in a request object then the data is lost after displaying first page. When user hits Next link to view more data I need to do another query to database which I want to avoid. I display only 20 rows at a time. So if my query returns 100 rows I display 5 pages. I need to retain data when user hits next to view other pages. What is the best way to handle this?
    - Raj

    By caching your resultset. There are caching custom tags that perform this function. Check out http://www.servletsuite.com/jsp.htm.

  • Nested AGO function in OBIEE

    Hi ,
    I am not able to understand the reason behind using Nested AGO functions.
    In one of the logical columns (Sales LastYear LastWeek) the mapping was in the following fashion:
    Ago(Ago("Core"."Fact - Retail Inventory Receipts"."Receipts Retail" , "Core"."Date Retail Fiscal Calendar"."Fiscal Week" , 1) , "Core"."Date Retail Fiscal Calendar"."Fiscal Week" , 52)
    Is it the same as writing a ago function with period of 53?
    Like this:
    Ago("Core"."Fact - Retail Inventory Receipts"."Receipts Retail" , "Core"."Date Retail Fiscal Calendar"."Fiscal Week" , 53)
    Please help me understand.
    Thanks for your help.
    Anand

    Hi Anand,
    This is how I interpret the function:
    Display the fact 'Receipts Retail' for the current fiscal period minus one fiscal week minus 52 fiscal weeks. So basically: Display the fact for the current fiscal period minus 53 fiscal weeks.
    However, since the column is named 'Sales LastYear LastWeek', this definition is a bit tricky. The formula is only true, if the fiscal year consists of 52 fiscal weeks (most of the time this is correct, but you never know!). I would prefer changing the second part of the forumula to Fiscal Year, 1:
    Ago(Ago("Core"."Fact - Retail Inventory Receipts"."Receipts Retail" , "Core"."Date Retail Fiscal Calendar"."Fiscal Week" , 1) , "Core"."Date Retail Fiscal Calendar"."Fiscal Year" , 1)
    This will substract a fiscal week and a fiscal year.
    I hope this helps.
    Regards,
    Marco Siliakus

  • OBIEE 11g Ago Function

    Hi All,
    I am using ago function in Answers it works fine
    But
    when observing the data, data is mismatched at particular Product category, why because two category s (A,B)   has same subcategory name (Basic)
    CAT       Sub Cat
    A  ------        Basic
    A  ------       Value Add
    A  ------       High
    B -------     Basic
    B ------       low
    B ------     medium
    My report has five columns like CM -1 , CM-2,CM-3,CM-4,CM-5 ,
    when i was selecting cat A and subcat is Basic, Data as below ....
    CM-1         CM-2     CM-3     CM -4    CM -5
    A basic   A basic  B basic B basic   A basic
    if sub cat name is different no issue
    Please help me.
    Regards
    Rm

    You can create a compound key of Cat + SubCat (concatenation in a logical column is a quick win) which will render the SubCats unique and assign that as the logical level key:
    SubCat:
    A-Basic
    A-Value Add
    A-High
    B-Basic

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

  • Does R3 have a report or function module to process payments requests?

    HI All,
    I want R3 report or function module which will receive payment requests from vendor or customer and then procees it depending on the data.
    Does R3 have such a report or function module to process payments requests?
    Please help me.
    Thanks.

    yes SAP as got a function for this
    you can you use trannsaction code /nF111
    for these purposes

  • 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

Maybe you are looking for

  • INstalling windows xp sp-2 on  macbook..... Problems i cant find answer to

    I have wanted a mac for a long time so i bought one on 8-28. I have a program that only runs on windows so an apple associate said easy as pie to do on a macbook. SO i bought the Black Macbook and love the Mac side thus far. I had to go out and a buy

  • Repainting JPanels / Memory Allocation

    Hi there! I just wrote a small Programm to test some graphical algorithms using a double-buffered Swing JPanel in a JFrame. The Paint method of the JPanel iterates through a Vector drawing the Objects inside. The repaint occurs every 10ms. Now when I

  • Sample Data for OWB 10gR2

    Hi All, Can i find some example for 10gR2 which I can import into the respository? I heard about Global Sample data but could not find it. Does anyone has the link?? Thanks in advance. Regards, Sam.

  • Workflow That Does Auto Numbering

    Above is a workflow that i have created but upon running it am getting the following error message Resume this workflow RequestorId: 86bf7237-b7b5-dcbd-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow i

  • Dialogs with servlets

    Hi Does anyone know how to use dialogs with servlets? I'd like to show a confirm dialog on the client machine. My first idea was to use JOptionPane.showConfirmDialog as such in the servlet, but then of course de dialog pops-up on the server side, and