OBIEE 11g Calculated column problem

Hi Gurus,
I want to convert to below condition to obiee.
Database Condition like below:
ZEROIFNULL(CAST((CAST(COUNT(CASE WHEN END_output<=.033 and END_output>='-.117' THEN END_output END) AS FLOAT)/
CAST(NULLIFZERO (COUNT(In_PUT)) AS FLOAT)) AS DECIMAL(10,1)))*100 AS Real_Time
In Database output is = 48
I have converted to OBIEE like below.
IFNULL( CAST ( COUNT(CASE WHEN "- Order Fact"."END_output" <= .033 and "- Order Fact"."END_output" >='-.117' THEN "- Order Fact"."END_output" END) AS FLOAT ), 0) / CAST(IFNULL (COUNT("- Sales Fact"."In_PUT"),0) AS FLOAT ) *100
In OBIEE output is = 45
Note: I am getting two or three count difference in OBIEE.
I guess the problems is Decimal, how to apply decimal in obiee like (DECIMAL(10,1)))..
Please help on this.
Thanks

user12301120 wrote:
Hi Gurus,
I want to convert to below condition to obiee.
Database Condition like below:
ZEROIFNULL(CAST((CAST(COUNT(CASE WHEN END_output<=.033 and END_output>='-.117' THEN END_output END) AS FLOAT)/
CAST(NULLIFZERO (COUNT(In_PUT)) AS FLOAT)) AS DECIMAL(10,1)))*100 AS Real_Time
In Database output is = 48
I have converted to OBIEE like below.
IFNULL( CAST ( COUNT(CASE WHEN "- Order Fact"."END_output" <= .033 and "- Order Fact"."END_output" >='-.117' THEN "- Order Fact"."END_output" END) AS FLOAT ), 0) / CAST(IFNULL (COUNT("- Sales Fact"."In_PUT"),0) AS FLOAT ) *100
In OBIEE output is = 45
Note: I am getting two or three count difference in OBIEE.
I guess the problems is Decimal, how to apply decimal in obiee like (DECIMAL(10,1)))..
Please help on this.
ThanksTry multiplying by 100.0 instead of 100

Similar Messages

  • OBIEE 11G Calculation the Correct Way

    Hi All,
    My requirement is like this that I want to calculate value Gross Profit which is simple Total Revenue - Total Expense. Now I want this to act as a Hierarchy i.e Gross Profit should be drill able to Total Revenue followed by Total Expenses. For this I created a Accounts Dimension table since no Drill Down facility is available on Fact Table(Therefore I had to move my Accounts to Dimension table rather than Fact Table). Now the problem is that there is no minus based aggregation present in OBIEE BMM layer because of which my all other sum based aggregation work correctly except where there is a negative based aggregation required like in the case of Gross Profit. Kindly Suggest what is the correct way to approach this problem. I am working on OBIEE 11g in this case.
    Warm Regards
    Abhishek Kapoor

    Financial reporting is difficult in BI because of the user preference of how to see signs on different accounts and requirements for adding/subtracting depending on the type of account.
    A few ways to approach:
    a. Use case statement to make total rev and total expense columns. Subtract to build a gross profit column. You can do this in the presentation services front end or the BMM.
    b. If you have opposite natural signs for rev and exp, you can create an account hierarchy in the account table which will net out to gross profit. Ex:
    Column 1 – account number
    Column 2 – hierarchy level 1, ex Gross Profit
    Column 3 – hierarchy level 2, ex Rev or exp
    Column 4 – account name
    Etc…
    c. Remember you can always build your own drilldown using navigation links to a report instead of the built-in drilldown.
    Good luck!

  • OBIEE-11g Double columns question

    Hi guys, on my pc i've installed business intelligence suite 11.1.3 and now I need support about double columns feature. In the business model I've this hierarchy
    Region -> Province -> Municipality
    where the keys for each level are represented by the name of the element, the problem is that this keys are used to map geometric shapes to enable the map views features and the Municipality values are ambiguous in their domain (could exist two municipality with the same name but different province) in the official documentation is wrote that to unique identify a shape should be used a double columns field but when I 'apply the double field feature to the hierarchy levels the drill feature doesn't work properly and I get a strange filter error (seems that the system filter the value by id on the wrong field). Somebody could help me to understand if I can define a hierarchy where the keys have a descriptor id associated ?
    Thanks a lot Regards

    I 've also come up with the same issue. I am using OBIEE 11G (11.1.1.5.0) and Oracle Mapviewer Ver11_1_1_4_B110225.
    On the RPD, My hierarchy is defined as: District -> Quarter -> Neighbourhood.
    For each hierarchy level I am using:
    District Logical Level keys:
    District Id: Primary Key
    District Name: Use for Display
    Quarter Logical Level Keys:
    Quarter Id: Primary Key
    Quarter Name: Use for Display
    Neighbourhood Logical Level Keys:
    Neighbourhood Id: Primary Key
    Neighbourhood Name: Use for Display
    I need to associate each Mapviewer theme's ID (District ID, Quarter ID, Neighbourhood ID) with a relevant BI column, because the theme names are not distinct.
    I have set the double column (Descriptor Id) feature: (District ID, Quarter ID, Neighbourhood ID) on each BI name column (BI Distict Name, BI Quarter Name, BI
    Neighbourhood Name) of the business model and associated the layer key (ID) of each Mapviewer theme with the corresponding BI name column.
    On the map view, drilling down from District to Quarter works properly, but I get the following action error while drilling down from quarter to neighbourhood:
    An error occurred while trying to generate drill down query.
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError:
    46036] Internal Assertion: Condition rowValues.size() == numColumns, file server\Query\Src\SQNavigatorAccess.cpp, line 495. (HY000)
    SQL Issued: {CALL NQSGenerateDrillDownQuery('SELECT District Name saw_0, Quarter Name saw_1, DESCRIPTOR_IDOF(District Name) saw_2, DESCRIPTOR_IDOF(Quarter Name)
    saw_3 FROM "Subject Area" WHERE DESCRIPTOR_IDOF(District) = 5','1','''5'',''31'',31','-1 -1 -1 -1 -1','0,2,3')}
    However, if I add a table view on my analysis and click on the table view's quarter link, drilling down works ok both for the table and for the map view.
    Moreover, I tried removing the double column (descriptor Id) feature from the business model while maintaining the hierarchy as described above.
    I then associated the layer key (ID) of each Mapviewer theme with the corresponding BI ID column instead of the BI name column.
    On the map view while drilling down from District to Quarter, a filter to a specific District is applied, but the associated Quarters theme is not displayed.
    Finally, if I enable the "Use for Display" checkbox for each hierarchy level's primary key on the RPD, and maintain the association between the layer key (ID) of
    each Mapviewer theme with the corresponding BI ID column, drilling down works correctly but only on the ID.
    I need drilling down to work while clicking on the each name BI column of the hierarchy while defining the association on the layer key ID of each mapviewer
    theme. Is this possible? Any ideas?

  • Weird behaviour of OBIEE 11g hierarchy columns

    Hi,
    I'm facing this weird issue when i implement the OBIEE 11g new feature called hierarchy column.The issue is that the last value in the hierarchy is reporting
    Example
    Store Heir-achy
    ->Store Country
    ->Store City
    ->Store name
    ->Store Name
    ->Store name (And the level goes on and on).
    I don't know why this weird thing is happening.Any help is appreciated.
    Thanks,
    Sunny.

    Thanks for the response, in regards to whether it is 1 or 2 Logical Facts, it is still the same behaviour. IN regards to the Logical Dimension, yes it is set with two LTS with the applicable content levels set. I even tried that as just 1 LTS doing the join through the General tab. Still the same behaviour with the drill-down. I am assuming it will always go through the full drill path regardless of what level the Fact you are hitting is at.

  • EXCEL CALCULATION IN CALCULATED COLUMN PROBLEM

    Hello,
    Please someone kindly help out with this calculation problem. I have an Excel file with this calculation:
    =IF(E10<D10,E10/D10,E10/E10)
    I am trying to translate this into a calculated column in a list and I can't seem to succeed with it. Can anyone try this out and be my hero.
    You've only got ONE LIFE; HELP as many people as you can, and ENJOY IT while it lasts. People are in the centre of our happiness, even God understands that.

    Hello Hemendra,
    Voila! here it is finally.
    =IF([SCORE-FM1]/[TARGET-FM1]*100>=100,"100",[SCORE-FM1]/[TARGET-FM1]*100)
    Frankly I couldn't believe it! It does fulfill my requirement. Thanks a lot for pointing in the right direction.
    Let me explain what this does.
    whenever the target is higher than the score (and inversely whenever the score is lower than the target)
    (still saying one and the same thing), we will always get a figure less than 100% (say anything between 0% - 99%) and this perfectly OK. That is what is happening in the above image where 89% and 33% is %Achieved.
    Also, whenever the score is the same with the target, the result will be 100%, that is what happened
    to the last calculation having "3" and "3".
    But whenever the score is higher than the target, the result will be over 100% (say 120%, 180%, 350%,
    etc). I want it such that whenever this is the case, the logic should trim it down to 100%. This is what the below calculation does:
    =IF([SCORE-FM1]/[TARGET-FM1]*100>=100,"100",[SCORE-FM1]/[TARGET-FM1]*100)
    Thanks Hemendra for being online. And for Sylvester Oriabor and Chinenye Nwanna who are offline who helped to drive this to conclusion, especially Chinenye Nwanna. Thank you all.
    You've only got ONE LIFE; HELP as many people as you can, and ENJOY IT while it lasts. People are in the centre of our happiness, even God understands that.

  • OBIEE 11G - Double column (Descriptor Id)

    Hello All,
    I have a problem in implementing Descriptor ID functionality. I have a time dimension, for which i am using Year, Period Name and Period Number.
    I have placed Period Number as Period Name ID column and in the report i am using the period Number to be filtered out. I created a dashboard prompt with Year and Period with limit values on Period Name.
    After selecting the year, when i select the period, its getting the months only for that selected year, its fine. once I click on apply, the period prompt is changing to another value but report filtering is fine.
    for Ex: Selected Year is 2012 and for that i got all the periods from Jan-12 to Dec -12. When i Select Mar-12 and click on Apply, the report is filtering for Mar-12 but, I prompt value is changed to Mar-14 (why 14 is because i have records in time dimension till 2014) .
    I verified the log, and see that... year is not passing for period as i have year and period filters report is fine. but after population
    SELECT DESCRIPTOR_IDOF("<table>"."Fiscal Period") saw_0, "Time"."Fiscal Period" saw_1 FROM "<Subject Area>" WHERE DESCRIPTOR_IDOF("<SA>"."Time"."Fiscal Period") = 8 ORDER BY saw_0, saw_1
    I am using OBI 11.1.1.5 version
    Any help is gr8ly appreciated..
    Thanks in Advance...
    Regards,
    KN

    Hi,
    Did you enabled check box on your perod prompt and select “Enable user to select by Code Column”
    Note: filter option will not work in case of Operator other than is equal/not equal/between
    Refer:
    http://www.rittmanmead.com/2010/08/oracle-bi-ee-11g-handling-double-columns-iddescription-interoperability/
    http://gerardnico.com/wiki/dat/obiee/double_column
    Thanks
    Deva

  • Obiee 11g hierarchy columns download into csv format.

    When using hierarchical columns, Is there a way to download the results as the user see it on the view (be it table or pivot view) into a CSV format.
    Excel format works, but if the user drill down on the hierarchy column and then export in CSV format... the data gets exported to the level the report was originally set.
    Is there any way to change this behavior?
    One option we can recommend to users is to download in excel format and then convert to CSV....if needed.
    FYI, we just starting looking into 11g 11.1.1.5 version... planning to migrate from 10g to 11g...
    Thanks
    Sundar

    Nii Moi wrote:
    Hi Every Body,
    am using asp.net as a front end and oracle 11g as back end am wondering if there is a way to download data in an csv format and merge them into a table.How is this related to Application Express ? Please explain

  • OBIEE 11g  Initialization Block problem with WLS User

    Hello,
    a brief description of my environment:
    - I have one machine with all OBIEE 11.1.1.6.2 components (build 120604.0813 BP1 64bit) and Oracle Database 11gR2;
    - In a separate machine I have the OID - Oracle Internet Directory where I have all business users with access to OBI Presentation Services;
    - In Weblogic Console I created a user named "weblogic" and this one is the administrator of all BI environment, this user is member of BIAdministrator and Administrators group, also this user is used to perform the communication between Fusion Middleware and Weblogic;
    - In weblogic Console I created a second user named "init_test" and he have the BIAuthor Role like the users that come from OID;
    - I have no problem logging in with all users OID and weblogic.
    Problem:
    - I created a simple Initalization Block and a variable to contain the result of the follow sql: SELECT region FROM adm_test_region WHERE city='Lisboa'
    - Initialization Blocks for Session variables are not working for "weblogic" user. For all other users everything is working as expected (users from OID and "init_test").
    Question:
    - There is any restriction in terms of Initialization Blocks for Session variables regarding the user that is linking Oracle Fusion Middleware with Oracle Weblogic?
    Thank you in advance,

    950780 wrote:
    Hello,
    a brief description of my environment:
    - I have one machine with all OBIEE 11.1.1.6.2 components (build 120604.0813 BP1 64bit) and Oracle Database 11gR2;
    - In a separate machine I have the OID - Oracle Internet Directory where I have all business users with access to OBI Presentation Services;
    - In Weblogic Console I created a user named "weblogic" and this one is the administrator of all BI environment, this user is member of BIAdministrator and Administrators group, also this user is used to perform the communication between Fusion Middleware and Weblogic;
    - In weblogic Console I created a second user named "init_test" and he have the BIAuthor Role like the users that come from OID;
    - I have no problem logging in with all users OID and weblogic.
    Problem:
    - I created a simple Initalization Block and a variable to contain the result of the follow sql: SELECT region FROM adm_test_region WHERE city='Lisboa'
    - Initialization Blocks for Session variables are not working for "weblogic" user. For all other users everything is working as expected (users from OID and "init_test").
    Question:
    - There is any restriction in terms of Initialization Blocks for Session variables regarding the user that is linking Oracle Fusion Middleware with Oracle Weblogic?
    Thank you in advance,When you say they are not working:
    1) You are using the session variables in a data filter in the RPD and for weblogic, the filter does not get applied?
    2) When trying to display the value of the sessoin variable in an analysis query, it errors out saying no value?
    As a BI Administrator, no data filters gets applied to the reports from the RPD unless you explicitly add them in the front end to the reports.
    You can also open the RPD in online mode, and go to sessions and kill everything, login using weblogic and monitor the sessions to see if a session is being created and the list of variables getting intilialized upon weblogic's entry into analytics.
    Thanks,
    -Amith.

  • Issue with OBIEE 11g measure columns

    Hi,
    Recently one of our application got migrated from 10 to 11g. post migration we had patched 6.1 and 6.2.
    measure column defined in RPD were working fine in 10g and 11g(after patching) as well. Suddenly all measure columns are behaving abnormal.
    Even though the measures are defined at particular level, the values are getting summed up and displaying the same for each and every dimension entity.
    Simply bifurcation is not happening according to the dimension in all the reports.
    c1 c2 c3
    a x 2
    b y 2
    c z 2
    Any guess?
    Warm Regards
    Kishore Panuganti

    Check the physical query for group by clause cols, and check for those columns levels.

  • OBIEE 11g - Essbase Performance Problem

    Hi All,
    I'm have one query in OBIEE with Hardcoded Filter (exemple Year = '2012'), the query send it to Essbase contains this Filter.
    But If I use Session Variable into the Filter (exemple Year = NQ_SESSION.VALUEOF(CURRENT_YEAR)), the query send it to Essbase doesn't contain this Filter.
    So, the query in Essbase take a long time, and then OBIEE takes time to Filter Data in OBIEE Server.
    My question : How can OBIEE substitue the Session Variable Before sending query to Essbase ?
    Thanks
    Youssef

    Hi Youssef,
    Maybe you could create a dashboard prompt with your filter and with a default value NQ_SESSION.VALUEOF(CURRENT_YEAR)).
    After in your report you add a filter "as prompted" on your field.
    If you want you can hide the dashboard prompt to not show it.
    It is not the best solution but it could be a workaround in your case - I don't test it.
    Hope it helps,
    Benoit

  • OBIEE 11g: Freeze Column Headers?

    Hello experts,
      I am still new to 11.1.17 and my boss wants me to have the report’s panes frozen, just like in excel.  Does anyone if there is an easy way to do this besides going through the instanceconfig.xml? Just through analysis
    I was thinking from 11.1.1.6 may be things have improved.  Anyone with a full step by step instructions?
    Will surely appreciate the help  

    If that is the case you can follow 10g style of paging in table view to achieve both
    http://bischool.wordpress.com/2009/08/24/pagination-or-page-contol-in-obiee-pivot-view/
    Thanks,
    Saichand

  • Peoplesoft Trees as Hierarchial Columns in OBIEE 11g

    Sorry for a duplicate posting. Logged in as a normal user with random number. I know how much people hate it. Logged in as myself now.
    Hi,
    I have extensively searched using Google or 11g docs but could not find a proper solution to using Peoplesoft trees in form of hierarchial columns in obiee 11g. Can the rpd of obiee 11g be designed to view the Peoplesoft tree structure( as it is in Tree manager in Pplsoft) as hierachial columns in obiee 11g? I am sure hierarchial columns as a 11g feature are not just for visual representation in tree format but also can be viewed in Answers and queried against it,am I right?
    Anybody who has worked on trees and OBIEE 11g hierarchial columns? Ahsan/Navin??
    Thanks,
    Dan

    I have not used the 11g hierarchical columns for PSoft Trees but I can think of a glaring reason NOT to do this..PERFORMANCE. If I understand correctly, 11g issues a group by and Union as you traverse this type of structure and PeopleSoft trees have a number of tables to represent the actual TREE. I cannot possibly see how this can be effective especially with a large scale BI Apps DW? This is part of the reason the trees get flattened out via the OOTB ETL adaptors for PSoft.

  • How to Calculate Leap Year ago in OBIEE 11g

    Hi Gurus,
    I have one fact table and having one measure column. I have to calculate current year and Last year.
    Using Time series function (Todate,Ago) have calculated current year as well last year also.
    The problem is Current year is showing correct value only but Last year was showing wrong data.
    We found the problem is Leap year, last year FEB month is having 29 dates. Due to this we are getting wrong date.
    Kindly suggest me how to achieve this requirement.
    Thanks

    Hi Gurus,
    How to resolve Leap Year calculation in OBIEE 11g.
    The problems is Year Ago column.
    Please suggest me how to resolve this.
    Thanks

  • Different calculation on each column in table in obiee 11g report??

    Hi ,
    I have to display values in a table for measures in obiee 11g report which should hold different calculation on each column. For ex:
    Result 1:
    Flag  Display   Transaction  Amount
      C      'A'                 2              3
      C      'B'                 3               0
           SubTotal1            5             3
    Result 2:
    Flag  Display   Transaction  Amount
      H      'C'                 2              11
      H      'D'                  0              0
           SubTotal2          2             11
    Result 3:
    Flag  Display   Transaction  Amount
      H      'C'                 1              0
      H      'D'                  1            0
           SubTotal3          2            0
    Final Result:(Transaction shd hold :-subtotal1-subtal2 , Amount should hold:-subtotal1-subtal2+subtota3)
    Flag   Display               Transaction         Amount
    C    'total tran(1-2)              3                     8
           Total Amnt(1-2+3)'     
    Please help me how can i achieve this ... ??? I am new to OBIEE 11g.
    Thanks,
    Pavi

    There are a few things I cannot understand; I'm assuming Transaction and Amount are fact columns. Then how do they have different values for the same values of Flag and Display ??
    Anyway, sub total can be achieved by going to edit view for the table and from columns and measures area under the Layout pane click on the summation icon and select After.  This will automatically display a grand total value at the bottom of each fact column.
    Now, to get the final result, say Total Transaction you can add a dummy column and edit its formula.
         Total Transaction = trans_subtotal1 - trans_subtotal2 and
         Total Amount = amt_subtotal1 - amt_subtotal2 + amt_subtotal3
         Now if we could say that trans_subtotal1 is the total of transaction value when Flag = 'C' or something like that then you can get this value of subtotal1 by using the formula FILTER(SUM("Subject Area"."Folder".Transaction Column") USING (DESCRIPTOR_IDOF("Subject Area"."Folder"."Flag column") = 'C')).  Similarly we can obtain subtotal2 and subtract them to get the total transaction value.  But I am sure if we can do this because for the same values of Flag and Display, Transaction has different values.  But by using the above formula, the values we obtain for subtotals 2 and 3 will be the same.  So calculating Total Amount would be a problem.
    The above formula is obtained by going to edit formula and selecting the filter option at the bottom of the edit dialog box.
    Hope I made my point clear

  • OBIEE 11g - serious problem when rotating columns into "table prompt" area

    Hi, I'm hitting an OBIEE 11g issue that's causing huge problems on reports. Essentially, the problem is this - if I dump all the columns of a query to a table, everything looks fine. But if I rotate one of the columns into the "table prompts" area, OBIEE is actually resubmitting a WRONG query. The query format changes from:
    WITH
    SAWITH0 AS (select sum(T38965.ORIGINAL_BUDGET) as c1,
    T12637.ORG_ID_DESC as c2
    from
    GL_ANALYTICS.DIM_ACCOUNT T12582,
    GL_ANALYTICS.DIM_ORG T12637,
    GL_ANALYTICS.DIM_ACCOUNTING_PERIOD T12597,
    GL_ANALYTICS.FACT_LEDGER T38965 / FACT_LEDGER_ytd */*
    where  ( T12582.ACCOUNT_KEY = T38965.ACCOUNT_KEY and T12582.STATEMENT_TYPE_CODE = 'Income Statement' and T12597.ACCOUNTING_PERIOD = 11 and T12597.FISCAL_YEAR = T38965.FISCAL_YEAR and T12597.FISCAL_YEAR = 2012 and T12637.ORG_KEY = T38965.ORG_KEY and T38965.FISCAL_YEAR = 2012 and (T12637.DEPARTMENT_CODE_DESC in ('D0200 - Arts Administration', 'D0206 - Film Studies')) and T12597.ACCOUNTING_PERIOD >= T38965.ACCOUNTING_PERIOD )
    group by T12637.ORG_ID_DESC)
    select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3 from ( select distinct 0 as c1,
    D1.c2 as c2,
    D1.c1 as c3
    from
    SAWITH0 D1
    order by c2 ) D1 where rownum <= 65001
    and changes to:
    WITH
    SAWITH0 AS (select distinct T12637.ORG_ID_DESC as c1
    from
    GL_ANALYTICS.DIM_ACCOUNT T12582,
    GL_ANALYTICS.DIM_ORG T12637,
    GL_ANALYTICS.DIM_ACCOUNTING_PERIOD T12597,
    GL_ANALYTICS.FACT_LEDGER T38927 / FACT_LEDGER_period */*
    where  ( T12582.ACCOUNT_KEY = T38927.ACCOUNT_KEY and T12597.ACCOUNTING_PERIOD = T38927.ACCOUNTING_PERIOD and T12597.FISCAL_YEAR = T38927.FISCAL_YEAR and T12582.STATEMENT_TYPE_CODE = 'Income Statement' and T12597.ACCOUNTING_PERIOD = 11 and T12597.FISCAL_YEAR = 2012 and T12637.ORG_KEY = T38927.ORG_KEY and T38927.ACCOUNTING_PERIOD = 11 and T38927.FISCAL_YEAR = 2012 and (T12637.DEPARTMENT_CODE_DESC in ('D0200 - Arts Administration', 'D0206 - Film Studies')) ) ),
    SAWITH1 AS (select sum(T38965.ORIGINAL_BUDGET) as c1,
    T12637.ORG_ID_DESC as c2
    from
    GL_ANALYTICS.DIM_ACCOUNT T12582,
    GL_ANALYTICS.DIM_ORG T12637,
    GL_ANALYTICS.DIM_ACCOUNTING_PERIOD T12597,
    GL_ANALYTICS.FACT_LEDGER T38965 / FACT_LEDGER_ytd */*
    where  ( T12582.ACCOUNT_KEY = T38965.ACCOUNT_KEY and T12582.STATEMENT_TYPE_CODE = 'Income Statement' and T12597.ACCOUNTING_PERIOD = 11 and T12597.FISCAL_YEAR = T38965.FISCAL_YEAR and T12597.FISCAL_YEAR = 2012 and T12637.ORG_KEY = T38965.ORG_KEY and T38965.FISCAL_YEAR = 2012 and (T12637.DEPARTMENT_CODE_DESC in ('D0200 - Arts Administration', 'D0206 - Film Studies')) and T12597.ACCOUNTING_PERIOD >= T38965.ACCOUNTING_PERIOD )
    group by T12637.ORG_ID_DESC),
    SAWITH2 AS ((select distinct 0 as c1,
    D1.c1 as c2,
    cast(NULL as  DOUBLE PRECISION  ) as c3
    from
    SAWITH0 D1
    union all
    select distinct 1 as c1,
    D1.c2 as c2,
    D1.c1 as c3
    from
    SAWITH1 D1))
    select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3 from ( select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3
    from
    SAWITH2 D1
    order by c1, c2 ) D1 where rownum <= 65001
    I completely do not understand what is going on here. The second query has a ton of problems. First off, it's doing some type of UNION operation - no idea why it's doing that. And the real problem is that it's unioning results from a different fact table, FACT_LEDGER_period instead of FACT_LEDGER_ytd, which is completely screwing up our results.
    Long and short, I simply don't understand at all why the query should change just from rotating a column up into the table prompt area.
    Any ideas?
    Thanks,
    Scott

    Hi Scott,
    I see the query to be valid with each CTE doing the following Jobs.....
    1. I understand that this particular query is being generated to get the unique "ORG_ID_DESC " to fill up the table prompts.
    SAWITH0 AS (select distinct T12637.ORG_ID_DESC as c1
    from
    GL_ANALYTICS.DIM_ACCOUNT T12582,
    GL_ANALYTICS.DIM_ORG T12637,
    GL_ANALYTICS.DIM_ACCOUNTING_PERIOD T12597,
    GL_ANALYTICS.FACT_LEDGER T38927 / FACT_LEDGER_period /
    where ( T12582.ACCOUNT_KEY = T38927.ACCOUNT_KEY and T12597.ACCOUNTING_PERIOD = T38927.ACCOUNTING_PERIOD and T12597.FISCAL_YEAR = T38927.FISCAL_YEAR and T12582.STATEMENT_TYPE_CODE = 'Income Statement' and T12597.ACCOUNTING_PERIOD = 11 and T12597.FISCAL_YEAR = 2012 and T12637.ORG_KEY = T38927.ORG_KEY and T38927.ACCOUNTING_PERIOD = 11 and T38927.FISCAL_YEAR = 2012 and (T12637.DEPARTMENT_CODE_DESC in ('D0200 - Arts Administration', 'D0206 - Film Studies')) ) )
    2. This particular query is to get each prompt value and its corresponding data
    SAWITH1 AS (select sum(T38965.ORIGINAL_BUDGET) as c1,
    T12637.ORG_ID_DESC as c2
    from
    GL_ANALYTICS.DIM_ACCOUNT T12582,
    GL_ANALYTICS.DIM_ORG T12637,
    GL_ANALYTICS.DIM_ACCOUNTING_PERIOD T12597,
    GL_ANALYTICS.FACT_LEDGER T38965 / FACT_LEDGER_ytd /
    where ( T12582.ACCOUNT_KEY = T38965.ACCOUNT_KEY and T12582.STATEMENT_TYPE_CODE = 'Income Statement' and T12597.ACCOUNTING_PERIOD = 11 and T12597.FISCAL_YEAR = T38965.FISCAL_YEAR and T12597.FISCAL_YEAR = 2012 and T12637.ORG_KEY = T38965.ORG_KEY and T38965.FISCAL_YEAR = 2012 and (T12637.DEPARTMENT_CODE_DESC in ('D0200 - Arts Administration', 'D0206 - Film Studies')) and T12597.ACCOUNTING_PERIOD >= T38965.ACCOUNTING_PERIOD )
    group by T12637.ORG_ID_DESC)
    3. This particular query, I understand is to get the following data (Sample data) relating the prompts and their corresponding data
    column (c1) ;column (c2 ie ORG_ID_DESC); column(C3 ie sum(T38965.ORIGINAL_BUDGET))
    0;               ORG_ID_DESC1; NULL
    1;               ORG_ID_DESC1;10
    0;               ORG_ID_DESC2;NULL
    1;               ORG_ID_DESC2;40
    0;               ORG_ID_DESC3;NULL
    1;               ORG_ID_DESC3;29.8
    SAWITH2 AS ((select distinct 0 as c1,
    D1.c1 as c2,
    cast(NULL as DOUBLE PRECISION ) as c3
    from
    SAWITH0 D1
    union all
    select distinct 1 as c1,
    D1.c2 as c2,
    D1.c1 as c3
    from
    SAWITH1 D1))
    4. The last select statement does nothing but selecting the needed data which later gets arranged in the format as needed by the OBIPS
    select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3 from ( select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3
    from
    SAWITH2 D1
    order by c1, c2 ) D1 where rownum <= 65001
    Now, on the table being chosen for picking up "ORG_ID_DESC" might be pretty much depending on the best source available as you know. If you would like BI Server to pick up any particular source, probably you could try the "LTS Priority Group" way.
    Hope I was clear and it helps.
    Thank you,
    Dhar

Maybe you are looking for