Self join with fact table in Obie 10G

I am a newbie to obiee.I have a development requirement as follows-
I need to find supervisors designation with the existing star RPD design. explanation is below
                                                    DIM_Designation(Desig_Wid)
                                                  |(Row_wid)
                                                  |
DIM_EMPLOYEE--------WORKER_FACT------------DIM_Supervisor
(Row_Wid)-----------------(Employee_Wid)
                                  (Supervisor_Wid)------------(Row_Wid)
3 dimension is joined to fact to get employee, his supervisor and designation of employee. now i want to get the supervisor's designation? how is it possible? already employee and supervisor dimension is same W_employee_d table joined with fact as alias DIM_EMPLOYEE and DIM_SUPERVISOR. how to do self join with fact to get supervisor's designation. i do not have any supervisor_desig_wid in fact table. any help is deeply appreciated.

Yes,Duplicate the fact table create a primary key on the newly fact table alias dimension table.So you can ur data modelling as usual.

Similar Messages

  • Modelling Time Dimension with Fact Table containing Start Date and End Date

    Hi Gurus,
    I have a time dimension with Year till Date. I have a fact table which consists of Start Date, End Date, Person ID, Department ID.
    How do i design Time dimension with fact table the below scenario
    In the dashboard i have start Month and End month as prompts.
    In the report i need to display Count(Person ID) > Start Date and < End Date along the trend.
    For instance, i have selected Jan-2009 as start date and Apr-2009 as End Date, then i need to display Count(Person ID) of Jan-2009, Feb2009, Mar-2009 andApr-2009.
    I Can not connect Time dimension with only Start Date or only with End Date to get the trend along the months.
    Please advice on the issue which i am having.

    Hi,
    Thanks for the response, Infact i tried using Complex join in physical layer. I have considered Time table joined with Fact table, and used >= and took and alias of the Time table and joined fact table using <=. When coming to BMM, i am not knowing how do i design this as if i merge the both the time dimensiona and its alias into single table, values will not be correct and if i make them as seperate columns. i can not show the trend as both are different columns.
    Can you please let know where i am going wrong.
    Thanks

  • Joining two fact tables with different dimensions into single logical table

    Hi Gurus,
    I try to accomplish in Oracle Business Intelligence 11.1.1.3.0:
    F1 (D1, D2 and D3)
    F2 (D1 and D2 and D4)
    And we want to build a report F1 F2 D1 D2 D3 D4 to have data for:
    F1 that match only for D1-D2-D3
    and data for
    F2 that match only D1-D2-D4
    all that in one row, so D3 and D4 are not common dimensions.
    I can only do:
    F3 (D1, D2)
    F4 (D1, D2 and D4)
    And report
    F3 F4 D1,D2,D4 (all that in one row, and only D4 is not a common dimension)
    Here is the very good example how to accomplish the scenario 1
    http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.html
    But looks like it does not work in 11.1.1.3.0
    I get
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 14025] No fact table exists at the requested level of detail: [,,Clients,,Day,ROI,,,,EW_Names,,,,,,,,,,,,,,,,,]. (HY000)
    I am sure I set up everything correctly as advised in the blog but it works with only one not a common dimension
    Is it a bug in 11.1.1.3.0 or something?
    Thanks,
    Kate

    Thanks for all your replies.
    Actually, I've tried the solutions you guys mentioned. Generally speaking, the result should be displayed. However, my scenario is a little bit tricky.
    table Y's figures are not the aggregation of table X for D dimension. Instead, table Y's figures include not only D dimension total, but also others (others do not mean A, B, C dimension). For example, table Y stores all food's figure, while table X stores only drink's figure. D dimension is only about drink's detail. In my scenario, other foods' figure is not provided.
    So, even if I set D dimension to all/total for table X, table X's result is still not the same as table Y.
    Indeed, table Y does not have a column key to join to D dimension's key. So, if I select D dimension and table Y's measures at the same time in BI Answer, result returns no data. Hence, I can't compare table X and table Y's results with selection of D dimension.
    Is there any solution to solve this problem?
    Edited by: TomChan on Jun 3, 2009 9:36 AM

  • Unable to join 3 fact tables in obiee data model.

    Hi,
    I am unable to join the 3 fact tables in obiee rpd. If I join with 2 fact tables I got the data in repors, Once I add the one more fact table and join with related dimensions, I am getting nodata error. I am following all joins keys as per datamodel, I am able to see the data in database. anyone pls give me the solution. Thanks in advance.
    Edited by: 1007582 on May 23, 2013 2:17 AM

    Can you please give some more detail as in what you have model in RPD;
    For example, if There are 3 Fact table F1, F2, F3 and two Dimesion Confirmed_D1, Non_Conf_D2. Confirmed_D1 is joined to all three fact tables and Non_Conf_D2 is joined to F2.
    Now to implement this model we have to set the logical content level in BMM layer for Non_Conf_D2 in F1 & F2 to Total*. After this only we can report on Confirmed_D1, Non_Conf_D2, F1, F2, F3 whithout any error.
    Sometime join with multiple table can also result in No Data, since the join conditions filters out the result data.
    Please mark helpful or correct.
    Regards,
    Kashinath

  • No join with fact

    Hi All,
    We have requirement ie... we have 2 dims and 2 facts. 1st dim has join with 2 facts but 2nd dim has join with only 2nd fact, now we want a report on both dims and facts. what should i do for that
    thanks in advance

    Hi,
    Follow this link http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.html .....you need to create a single fact of the both facts that is wat is mentioned in the blog.
    Other one http://www.obinotes.com/2010/08/joins-within-logical-table-sources-in.html
    Hope it helps you.Mark points.
    By,
    KK

  • Avoid duplicates when i join with bridge table

    i have a requirement with many to many relations between fact and dimention,that is the reason we have created bridge tables in the database.
    if i execute only query on the fact table it is giving correct results.when ever i join with bridge tables it is returning lot of duplicate records.
    Ex:
    select amount from fact where column = 'xyz'
    100
    then it is returing one record.(this value is correct)
    when ever i join this fact table with bridge table then it is returning duplicate records.
    select a.amount from fact inner join bridge table b on a.fk=b.fk
    100
    100
    100
    100
    100
    how many number of fk's associated that many 100's are generating
    in this case it is returning duplicate records.
    in the RPD i have joined like one to many between fact to dimention.
    if anybody face this type of situation please let me know how to resolve this?(FYI...i would have to do this before BM..because lot of other thing are coming into picture on BMM that's why i should have to achieve this in either physical or in database.
    Thanks in advance
    Edited by: user12077461 on Apr 3, 2011 6:39 PM
    Edited by: user12077461 on Apr 17, 2011 4:51 PM

    I understand what you say but partially.. please explain in more detail how to do that;
    How should look the adrese_nezonate block, then? I have to add a 'name' column and set copy value from item property to 'STREETS.NAME', and database_property No?
    Then the post-query trigger how should look like (the order by clause)? The post-query sends the entire query (with where/order by clauses) to the server, but in that "select... where... order by" (built dynamically) there are only columns from that block (adrese_nezonate). I need to join with streets, INSIDE that query.
    Thanks.

  • Maximum number of tables that can be outer joined with one table in a query

    Hi All,
    Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
    Thanks,
    Srini

    srinu2 wrote:
    Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
    There is no limit to the number of tables you can outer join as long as you join them correctly.
    SQL> with a as
      2      (
      3      select 1 id, 2 b_key, 3 c_key from dual union all
      4      select 2 id, 1 b_key, 4 c_key from dual union all
      5      select 3 id, 3 b_key, 1 c_key from dual union all
      6      select 4 id, 4 b_key, 2 c_key from dual
      7      ),
      8      b as
      9      (
    10      select 1 id, 1 c_key2 from dual union all
    11      select 2 id, 5 c_key2 from dual union all
    12      select 3 id, 3 c_key2 from dual union all
    13      select 4 id, 2 c_key2 from dual
    14      ),
    15      c as
    16      (
    17      select 1 key1, 1 key2, '1-1' dta from dual union all
    18      select 1 key1, 2 key2, '1-2' dta from dual union all
    19      select 1 key1, 3 key2, '1-3' dta from dual union all
    20      select 1 key1, 4 key2, '1-4' dta from dual union all
    21      select 2 key1, 1 key2, '2-1' dta from dual union all
    22      select 2 key1, 2 key2, '2-2' dta from dual union all
    23      select 2 key1, 3 key2, '2-3' dta from dual union all
    24      select 2 key1, 4 key2, '2-4' dta from dual union all
    25      select 3 key1, 1 key2, '3-1' dta from dual union all
    26      select 3 key1, 2 key2, '3-2' dta from dual union all
    27      select 3 key1, 3 key2, '3-3' dta from dual union all
    28      select 3 key1, 4 key2, '3-4' dta from dual union all
    29      select 4 key1, 1 key2, '4-1' dta from dual union all
    30      select 4 key1, 2 key2, '4-2' dta from dual union all
    31      select 4 key1, 3 key2, '4-3' dta from dual union all
    32      select 4 key1, 4 key2, '4-4' dta from dual
    33      )
    34  select d.a_id, d.b_id, c.key1 as c_key1, c.key2 as c_key3, c.dta
    35  from
    36      c,
    37      (
    38      select
    39          a.id as a_id, b.id as b_id, a.c_key, b.c_key2
    40      from a, b
    41      where a.b_key = b.id
    42      ) d
    43  where d.c_key = c.key1 (+)
    44  and   d.c_key2 = c.key2 (+);
          A_ID       B_ID     C_KEY1     C_KEY3 DTA
             3          3          1          3 1-3
             4          4          2          2 2-2
             2          1          4          1 4-1
             1          2
    SQL>

  • ANSI Standard Join with Nested Table

    Does anyone know how to (or whether you actually can) use ansi standard table joins with nested tables.
    Non-ansi standard would look something like this
    SELECT e.empno
    FROM departments d, TABLE(d.employees) e
    WHERE d.deptno = 10;
    Where d.employees is a nested table.
    But if I try ansi-standard I like such:
    SELECT e.empno
    FROM departments d
    JOIN TABLE(d.employees) e
    WHERE d.deptno = 10;
    I get
    ORA-00905: missing keyword
    because I have nothing to join it on.
    Your help is very much appreciated

    Both replies worked fine.
    I think I will go with the NATURAL JOIN as it seems the cleanest option.
    Thanks Guru 2748

  • Can we Join 2 fact tables ?

    Hi All,
    We are trying to join 2 fact tables using a logical dimension. Let me explain my structure fact1 dim1 and fact2 dim2 another dim dim3 which is joined to Fact1. Other dim contains only columns for joining fact1 and fact2.
    When I pick columns from fact1 and dim3,dim1,dim2 it works good. Either Fact2,dim1,dim2,dim3 works good but does not wrok when using columns for both fact1 and fact2.
    Here we are using couple of materialized views both on Oracle Apps tables and some Custom tables.
    Can any one have some kind of solution when using multiple fact tables.
    Thanks,

    Yo can join as the same joins mentioned as per your physical joins.
    But you need to set dimensions hierarchy & aggregation level in BMM layer for sure.
    In Reports set the aggregation rule to complex server level.
    Regards,
    Darwin
    Edited by: Darwin S on Dec 24, 2009 1:13 PM

  • Case statement resulting into Left outer join with other tables

    Hi All ,
    I am facing a stuation where a Case statement on one of the logical columns in Answers is resulting into a left outer join with a table in the query.
    If we remove the case stmt, the table is not being acessed.
    The case stmt is a simple one and no other logical column is being accessed in the case stmt.
    Please advice .
    Thanks.

    Hi Sai,
    No ..we dont have any left outer join ...its just that I am selecting measure from F1 which has a confimred dimension D1 with F2.Now when I dont have case stmt on measure from F1(Case stmt is something like : CASE WHEN "- P table"."P Column" = 'Y' THEN 'Right' ELSE 'Wrong' END), then it doesnt query F2.
    However as soon as I introduce the case stmt ,the query creates a left outer join with F2.
    Thanks.

  • Join with another table in pre-query

    Hi,
    We have a large data block and we need to order some columns based on street name for example, not id. The base table of db block contains an id_street column, and 'streets' table contains id and name.
    Ok, in pre-query trigger of that block, we have a complex logic and we dynamically build the where clause. At the end, we set the order_By clause of the block, to order the rows, for example we need to order by the 'my_date' column asc (it's a date type column), and street desc; but street NAME, not id. We don't want to use a from clause query, because the dynamically where clause logic it's complex.
    How can we join the db block table with 'streets' table in pre-query, so when constructing the order by clause to specify something like
    set_block_property('ADRESE_NEZONATE', order_by, 'my_date, name desc');where 'name' is the name of the street, from the 'streets' table.
    Is it possible in pre-query, somehow? Or, in my case where can I join with that table and use that column in pre-query at setting order by?
    Thanks!
    Edited by: Roger25 on 26.04.2013 12:31

    I understand what you say but partially.. please explain in more detail how to do that;
    How should look the adrese_nezonate block, then? I have to add a 'name' column and set copy value from item property to 'STREETS.NAME', and database_property No?
    Then the post-query trigger how should look like (the order by clause)? The post-query sends the entire query (with where/order by clauses) to the server, but in that "select... where... order by" (built dynamically) there are only columns from that block (adrese_nezonate). I need to join with streets, INSIDE that query.
    Thanks.

  • Data being dropped after joining Fiscal Time with Fact Table

    Hi,
    In my RPD, i have jolined the Fiscal Calendar with my fact tables : Fiscal Day is joined to Create Time column in the fact table.
    Fiscal Day Data is : 6/6/2006 12:00:00
    Creare Time Data is : 6/6/2006 11:45:49
    6/6/2006 11:56:50
    When i pull the fiscal day column with the other columns fromthe fact table in the report, i only see a subset of my data. I beleive this is due to the timestamp and it is causing to drop records.
    Is there anyway, i can join this and not drop records due to the timestamp.
    ANy suggestions will be appreciated.
    Thanks

    I assume that fiscal day table is at the day level. I would suggest that you store the date in an integer format (for example 20060606 'YYYYMMDD') similarly you may store the creation_date_key in fact table which is also in the same format, then do a direct join. This will be provide good performance for your reporting since you are joining integers and not date or char formats.
    If you want time of creation date also, you might want to store it in a seperate column in say HHMMSS format, this when joined with time dimension will allow you hierarchical reporting for time too.

  • Fact table is joining with Other table having values for measures

    I have one Fact table named Fact1 where i am going to create some calculation measures based on the values in Table2.
    How should be the physical join between them and the logical join.
    Earlier we had those VALUES in Fact1 only
    Why we created table Table2 is there was bit confusion for the aggregation in Fact1.
    We are bit confused on whether to make Table2 as dimension or Fact as it is having some measures and not having the foreign keys
    How we have to proceed now..!! Please help us!!?

    I have one Fact table named Fact1 where i am going to create some calculation measures based on the values in Table2.
    How should be the physical join between them and the logical join.
    Earlier we had those VALUES in Fact1 only
    Why we created table Table2 is there was bit confusion for the aggregation in Fact1.
    We are bit confused on whether to make Table2 as dimension or Fact as it is having some measures and not having the foreign keys
    How we have to proceed now..!! Please help us!!?

  • Unable to join two fact tables via one common dimension in RPD(Repository)

    I have created two fact tables F1 & F2 and one dimension D.
    F1 is joined to D and F2 is also joined to D in Physical layer as well as in BMM layer.
    I created one report in OBI Answers using these three tables.It Showed me the following error.
    **Error Details**
    **Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P**
    **State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table dfghdfh) does not contain mapping for [Dashboard_Fact.Period_Sgt_Key]. (HY000)**
    **SQL Issued: SELECT dfghdfh.Period_Sgt_Key saw_0, "Period Dim".Period_Sgt_Key saw_1, Dashboard_Fact.Period_Sgt_Key saw_2 FROM service_delivery ORDER BY saw_0, saw_1, saw_2**
    How to cope up with the issue or can anyone tell me the alternate workaround for this?

    That is what i have tried.
    I have made a logical table TEST and dragged two fact tables f1 & f2 in source.
    Now when i drag different columns from different fact tables(that are in TEST logical table) in report, it gives an error and not making any joins that you are mentioning.
    ERROR MESSAGE:--
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table Test) does not contain mapping for [Test.SurveyName_Id, Test.SurveyHead_Id, Test.Respondent_Id, Test.SDBusiness_Area_Id, Test.Period_Sgt_Key, Test.OBS_Id, Test.VOCBusiness_Area_Id, Test.Question_Sgt_Key]. (HY000)
    The columns mentioned in the error message are all from test logical table..some are from F1 & some from F2.

  • Join two fact tables

    Hi,
    I have two fact tables F1 and F2 joined with few dimensions D1.....D9. D1,D2 and D3 are conformed dimensions.
    In Physical:
    F1>--D1,D2,D3,D4,D5,D6
    F2>--D1,D2,D3,D7,D8,D9
    In Logical:
    F1>--D1,D2,D3,D4,D5,D6
    F2>--D1,D2,D3,D7,D8,D9
    there are some ports already using above star schemas. now I got new requirements and I need to use measures from both the fact tables and conformed and unconformed dimensions.
    I did the following in logical
    F1 LTS GENERAL TAB ADDED F2,D1,D2,D3,D7,D8,D9 and in content tab set logical level to unconformed dimensions at total level and for conformed dimensios at details level.
    F2 LTS GENERAL TAB ADDED F1,D1,D2,D3,D7,D8,D9 and in content tab set logical level to unconformed dimensions at total level and for conformed dimensios at details level.
    but I'm still getting
    [nQSError: 14026] Unable to navigate requested expression:
    Please fix the metadata consistency warnings. (HY000)
    I cheked metadata global consistency and no errors found.
    Appreciate your help
    Thanks
    Jay.
    Edited by: Jay on Sep 27, 2011 10:14 AM
    Edited by: Jay on Sep 27, 2011 10:15 AM

    Let me explain my issue again
    In Physical:
    F1>--D1,D2,D3,D4,D5,D6
    F2>--D1,D7
    In Logical: Single logical fact Fact_FY_Ratio has two logical sources
    LTS1: F1>--D1,D2,D3,D4,D5,D6
    LTS2: F2>--D1,D7
    Set the content level for each LTS in Fact_FY_Ratio:
    F1 to Detail for D1,D2,D3,D4,D5,D6 and to Total for D7
    F2 to Detail for D1,D7 and to Total for D2,D3,D4,D5,D6
    In LTS 1 general tab added inner joins with all dimensions F1,D1,D2,D3,D4,D5,D6,D7and F2
    In LTS 2 general tab added inner joins with all dimensions F2,D1,D7,D2,D3,D4,D5,D6 and F1
    And I also did logical complex join for Fact_FY_Ratio with all logical dimensions D1,D2,D3,D4,D5,D6,D7
    I'm able to run query using D1,D2,D3,D4,D5,D7,F1,F2 but when I include D6(time dimension) it is causing problem with F2(witth F1 it is working fine).
    query success with:
    F1,D1,D2,D3,D4,D5,D6
    F2,D1,D7
    D1,D2,D3,D4,D5,D7,F1,F2
    Query failed with:
    F2>--D1,D7 and D6
    Please let me know anything wrong with above configuration.
    Thanks
    Jay...
    Edited by: Jay on Oct 3, 2011 7:11 AM

Maybe you are looking for