Problem querying over two fact tables

The business requirement is that we want to be able to see sales for two different periods of times, over different brands, different Items' years and seasons per periods.
So for the different dimensions I created alias having two tables in the physical layer
for Brands, Shops and Items (tables) [These are the tables where I query for different brand, Item's year and different season]. The Business Model Schema looks like this:
Items-----> SALES <------Brands Items 2-----> SALES 2 <------------Brands 2
^ ^
TIMES TIMES 2 (TIMES JOINED WITH SALES AND TIMES 2 WITH SALES 2)
and VENDORS connected to both SALES & SALES 2 left outer joined
The need is that I need to query over two indepedent periods of time with independed dimensions but for a common dimension (Vendors).
The presentation data simplified looks like this:
Answers
Vendor Sales Qty Sales 2 Qty
1092 234 123
The problem is that when a vendor doesn't exist in one period it doesn't come and in the other although there are sales. So when I query with the same filters (same period of time, Brands, Items' years and seasons) over these two fact tables I get the same sales and correct data. When there are different criteria then I lose data.
The Query fired in the database is the following:
select distinct case when D2.c4 is not null then D2.c4 when D1.c4 is not null then D1.c4 end as c1,
D1.c3 as c4,
D1.c1 as c5,
D1.c2 as c6,
cast(D1.c2 / nullif( D1.c1, 0) * 100 as DOUBLE PRECISION ) as c7,
D2.c3 as c8,
D2.c1 as c9,
D2.c2 as c10,
cast(D2.c2 / nullif( D2.c1, 0) * 100 as DOUBLE PRECISION ) as c11
from
(select sum(T43161.amnt_1) as c1,
sum(T43161.mk_1) as c2,
sum(T43161.qty_1) as c3,
T7120.VE_NAME as c4
from
VE04_TBL T7120,
GE04_COMPANY_TBL T43802,
EI04_TBL T6931,
Salesmcost T43161
where ( T6931.EI_CODE = T43161.ei_code and T6931.VE_CODE = T7120.VE_CODE and T6931.GE_COMPANY_CODE = '1' and T6931.EI_SEASON_CODE = 'Χ' and T6931.EI_YEAR = '2009' and T7120.GE_COMPANY_CODE = '1' and T7120.VE_CODE = T43161.ve_code and T43161.ge_company_code = T43802.GE_COMPANY_CODE and T43802.GE_COMPANY_NAME = '*** Φ. & Κ. ΛΕΜΟΝΗΣ ΑΕΒΕ ****' and T43802.LIST_ITEM_IND = '1' and T43161.trans_date >= ADD_MONTHS(TO_DATE('2010-05-12' , 'YYYY-MM-DD'), -7 * 12 ) and T43161.trans_date between TO_DATE('2009-01-01' , 'YYYY-MM-DD') and TO_DATE('2009-01-31' , 'YYYY-MM-DD') )
group by T7120.VE_NAME
) D1,
(select sum(T44099.amnt_1) as c1,
sum(T44099.mk_1) as c2,
sum(T44099.qty_1) as c3,
T7120.VE_NAME as c4
from
EI04_TBL T44615 /* EI04_TBL 2 */ ,
VE04_TBL T7120,
GE04_COMPANY_TBL T43802,
Salesmcost T44099 /* Salesmcost_2 */
where ( T7120.VE_CODE = T44099.ve_code and T7120.VE_CODE = T44615.VE_CODE and T7120.GE_COMPANY_CODE = '1' and T43802.GE_COMPANY_CODE = T44099.ge_company_code and T43802.GE_COMPANY_NAME = '*** Φ. & Κ. ΛΕΜΟΝΗΣ ΑΕΒΕ ****' and T43802.LIST_ITEM_IND = '1' and T44099.ei_code = T44615.EI_CODE and T44615.GE_COMPANY_CODE = '1' and T44615.EI_SEASON_CODE = 'Χ' and T44615.EI_YEAR = '2008' and T44099.trans_date between TO_DATE('2008-01-01' , 'YYYY-MM-DD') and TO_DATE('2008-01-31' , 'YYYY-MM-DD') )
group by T7120.VE_NAME
) D2
where ( D1.c4 = D2.c4 ) /*<------- I think that this join creates the problem*/
order by c1
Edited by: user1198434 on 12 Μαϊ 2010 5:14 πμ
Edited by: user1198434 on 12 Μαϊ 2010 5:41 πμ

Hi,
go through this
http://obiee101.blogspot.com/search/label/OUTER%20JOIN
I think you are new to the forum. try searching through some of the famous obiee forums. Gurus have already covered most of the issues. few are,
http://obiee101.blogspot.com
http://oraclebizint.wordpress.com/
http://gerardnico.com/weblog/
http://108obiee.blogspot.com/
thanks,
karthick

Similar Messages

  • Problems querying over two fact tables

    I have a problem! could anyone help???
    I have two fact tables (coming out from two select statements in the physical layer).
    SALES 2 is an alias of SALES. These two tables join with some dimensions. The schema is this:
    DIMENSIONS 1 >SALES <---COMMON DIMS----> SALES 2 <-- DIMENSIONS 2
    SALES has three separate dimensions joining only with it.
    SALES 2 the same.
    The problem is that there are two common dimensions between them. When I run a query for the same criteria the results are correct. But when I am running the query for different criteria SALES are affected by SALES 2 messing up the results. Probably the problem occurs by inner joining via the common dimensions. Can anyone help me please???? THANKS IN ADVANCE!

    Thank you very much for your patience....Here is the SQL:
    SELECT VE04_TBL.VE_NAME saw_0, SALES.qty_1 saw_1, "SALES 2".qty_2 saw_2, REPORT_SUM(saw_1 BY ), REPORT_SUM(saw_2 BY )
    FROM lpvemprofit
    WHERE (TIMES.trans_date BETWEEN date '2009-01-01' AND date '2009-01-10')
    AND (EI04_TBL.EI_YEAR = '2009') <-----(Item's Year)
    AND (EI04_TBL.EI_SEASON_CODE IN ('R', 'Ε', 'Χ')) <----- (Item's Season)
    AND (GE_SHOP_TBL.Brand = 'Καλογήρου') <-----(Shop's Brand)
    AND ("TIMES 2"."trans_date 2" BETWEEN date '2008-01-01' AND date '2008-01-10')
    AND ("GE_SHOP_TBL 2"."Brand 2" = 'Καλογήρου')
    AND ("EI04_TBL 2".EI_YEAR = '2008')
    AND ("EI04_TBL 2".EI_SEASON_CODE IN ('R', 'Ε', 'Χ')) ORDER BY saw_0

  • Querying against two fact tables with non conformed dimension

    I have two fact tables and I have this set up in RPD :
    Fact1 joined to DimA and DimB
    Fact2 joined to DimA
    On Front end I build two analysis:
    Analysis 1:
    DimA.A, Fact1.1, Fact2.2
    Analysis 2 :
    DimA.A, DimB.B, Fact1.1, Fact2.2
    In the results of Analysis 1 , I am seeing correct values for Fact2.2
    In the results of Analysis 2, I am seeing Fact2.2 as empty column. I think the reason is that Fact2 is not joined to DIMB.
    Is it possible that I should be able to report against both dimension tables (DIMA and DIMB) columns for FACT1 and FACT2 measures.... Even though I don't have join between DIMB and FACT2.
    Any response would be helpful!!!
    Regards,
    Annu

    Hi,
    Go to the LTS-- Content Level of the fact which does not have join with Dimension and put Total level for that Dimension and total level on Column(Measure also)(Double click --Levels)(Assume Dim Hierarchy is  already set up)
    Pull everything(D1,D2,F1,F2) You will see results.
    Update Me
    Thanks
    NK
    Edited by: DNK on Mar 20, 2013 1:35 PM

  • Problem: two fact tables and one conformed dimension

    Hi everyone!
    I need to solve this situation:
    I have two fact tables, let's say F1 and F2, that are both linked to D1, my conformed dimension
    I just need to select fields from D1 but I know that, when querying, OBIEE links it to a fact table anyway..how does it choose the fact table? That is, if I only want fields from D1, does the system queries also from F1 or F2? Is it a random choice?
    Is there a way to "force" this choice, telling the system for example to choose only from F1?
    Is there a workaround to solve this situation? Remember, I only need fields from D1.
    Thanks!!

    The solution of your problem is "Implict Fact Column"
    Go to presentation layer and double click on your subject area. then you will see Implict fact column option. click on set. give corresponding fact column there( in your case give F1 fact column)
    references: http://oracle-bi.siebelunleashed.com/articles/implicit-fact-column/
    Thanks
    GSR
    Edited by: GSR on Mar 20, 2012 3:22 PM

  • Unexpected results getting data from two fact tables through conformed dim

    Hi all,
    We are getting an unexpected behaviour in our OBIEE 10.1.3.3.3. We have this scenario:
    We have {color:#0000ff}2 fact tables{color}{color:#000000} called F1 and F2. F1 has one measure, f1m1 and F2 has another one, f2m1.
    We have {color:#0000ff}4 conformed dimensions{color}, called D1, D2, D3, Date.
    When we are requesting for individual fact tables, we are getting:
    date d1 d2 d3 f1m1
    dt1 - x - y - z - m1
    dt1 - x - y - z' - m2
    date d1 d2 d3 f2m1
    dt1 - x - y - z - m3
    dt1 - x - y - z'' - m4
    But, trying to obtain a compare scenario, we are getting
    date d1 d2 d3 f1m1 f2m1
    dt1 x y z m1 m4
    Instead of
    date d1 d2 d3 f1m1 f2m1
    dt1 x y z m1 m3
    Looking at query log, we have catched the reason. That's why BI Server is using to solve this request using ROW_COUNT() to join SAWITH0 and SAWITH1 in SAWITH2 result set. So, the order may not be the same in the results sets in every fact table. More or less, generated query is like:
    WITH
    SAWITH0 AS
    (select ....
    from F1),
    SAWITH1 AS
    (select ...
    from F2),
    SAWITH2 AS
    select from (select ...
    ROW_NUMBER() OVER PARTITION (....) c10
    from SAWITH0.d1 full outer join SAWITH1.d1 ....) D1
    {color:#ff0000}where (D1.c10 = 1){color}
    select SAWITH2. ....
    from SAWITH2
    order by c1..c10
    The problems seems to be that BI server is ordering the result sets SAWITH0 and SAWITH1 and getting row number to join this results sets, but this is not getting the correct result.
    Any ideas?
    TIA
    Javier
    {color}
    Edited by: jirazazábal on Mar 13, 2009 2:46 PM

    I have done a logical fact table with two fact table source on it.
    The Sql performed against the database was this one.
    -------------------- Sending query to database named PRODS_AIX (id: <<153418>>):
    WITH
    SAWITH0 AS (select sum(T21296.CONSUMERS_SALES_EURO) as c1,
         T21309.DIVISION_CODE as c2
    from
         DIVISION T21309,
         C_CONSUMERS_SALES T21296
    where  ( T21296.DIVISION = T21309.DIMENSION_KEY )
    group by T21309.DIVISION_CODE),
    SAWITH1 AS (select sum(T21356.ORDER_VALUE) as c1,
         T21309.DIVISION_CODE as c2
    from
         DIVISION T21309,
         DWH_SALES_ORDER_OVERVIEW T21356
    where  ( T21309.DIMENSION_KEY = T21356.DIVISION_KEY )
    group by T21309.DIVISION_CODE)
    select distinct case  when SAWITH0.c2 is not null then SAWITH0.c2 when SAWITH1.c2 is not null then SAWITH1.c2 end  as c1,
         SAWITH0.c1 as c2,
         SAWITH1.c1 as c3
    from
         SAWITH0 full outer join SAWITH1 On nvl(SAWITH0.c2 , 'q') = nvl(SAWITH1.c2 , 'q') and nvl(SAWITH0.c2 , 'z') = nvl(SAWITH1.c2 , 'z')
    order by c1As you can see one select (SAWITH0) for the first fact table C_CONSUMERS_SALES and one select for the second fact table DWH_SALES_ORDER_OVERVIEW (SAWITH1 ) and the two statement are joined with a full outer join.
    I ask me why you have the three select (SAWITH0,SAWITH1 and SAWITH2). Can you please paste the complete SQL performed ?
    Can you tell us also which SQL is performed if you select only the columns from one fact table and not for the other ?
    Regards
    Nico
    http://gerardnico.com

  • 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

  • Connection between two fact tables.

    I have a problem in OBIEE 10.1.3.2:
    I have two fact tables A and B. Both tables have three columns - time_id, position_id and valuea (table A), time_id, position_id and valueb (table B). I have dimensions TIME (id, time) and POSITION (id, post). Facts A and B are connected to dimensions and
    both queries
    select TIME.time, POSITION.post, A.valuea,
    select TIME.time, POSITION.post, B.valueb
    work properly.
    But it is definitely impossible to execute query
    select TIME.time, POSITION.post, A.valueA, B.valueB.
    [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table A) does not contain mapping for [B.VALUEB]. (HY000)
    Another two fact tables in the same application I can join in any query wihout any problem.
    How is it possible?
    Thanks for your help
    Jiri

    How did you joined two Fact tables. Did you use Dimension table between?

  • One DIMENSION, Two FACT Tables - One WEEKLY grain, one DAILY grain

    All the OBIEE gurus, thanks for checking out this post.
    Background: We have a common DIMENSION referencing two FACT tables having different granularity.
    DIM = Customer Dim
    FACT = Forecasting (Weekly granularity)
    FACT = Sales (Daily granularity)
    There is a need to report from the Customer Dimension table AND access the Forecasting FACT (weekly grain) & Sales FACT (daily grain).
    Example of query is listed below:
    Give me customer = 'ABC' and the forecast and sales for a specific time period.
    What will be the best way to handle something like this? I have seen examples of handing multi-fact table access in OBIEE but the granularity of both the FACT tables is different (weekly vs. daily).
    Any help with an example is greatly appreciated.
    Thanks,
    Sunshine

    Hi.
    This one:
    Joining different level aggregation measures together into a single logical fact table
    http://108obiee.blogspot.com/2009/07/joining-different-level-aggregation.html
    Regards
    Goran
    http://108obiee.blogspot.com

  • 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

  • Two fact tables in one business area

    Hi,
    Would there be problem if two fact tables, one flat, one with hierarchy, in one business area. Both fact tables are joined to same set of dimension tables except one: region_1 to fact_1, region_2 to fact_2. The consistency check is fine. But I get error in Answers. I don't have the exact error with me, but it is complains about fact_1 is not linked region_2.
    Any suggestions ?
    Thanks.

    Thank you, Stijn, Ced for your kind reply.
    I did not explain it clearly.
    The fact_1 (flat) table has data in all levels (detailed and aggregated). For example, it has % sales to planned from city, state to national (we were not provided with numberator and demoninator to aggregate the detailed data). The fact_2 table has only city level data and have a dimension region_2 with city, state and national hierarchy. For data in Fact_1 table, we simply want to show them in reports. For data in Fact_2 table, reports can drill-down.
    In Answers, the error is "Incorrectly defined logical table source ( for fact table Fact_1) does not contain mapping for region_2.state_id".

  • Two Fact tables with Different set of Dimension Tables

    Here is my scenario:
    I got two fact tables: X and Y (actually, they are the same tables, but with different level of data)
    and four dimension tables: A, B, C, D
    X joins relationship to all dimensions (A, B, C, D).
    Y joins relationship to only A, B, C, but no D.
    When I select dimension A, B and C together with fact tables X and Y in BI Answer, result is displayed and compared.
    However, if I select dimension D together with fact tables X and Y, only data from fact table X is displayed. There is no result displayed for fact table Y. I know that this is because fact table Y does not join to dimension D.
    If the above relationship unchanged, how can I display both X and Y's result in BI Answer when dimension D is selected?

    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

  • How to query on multiple fact tables ?

    Hello all,
    I know this is a recurring subject around here. I have read various topics and tried many thing but I couldn't reach my goal :
    I want to query a BMM with 6 fact tables that all have common dimensions.
    For instance, I have Invoices facts, Stocks facts, and a common SpareParts dimension.I am currently using a prewiew of my target BMM, which contains only these 2 fact tables and this single dimension. They are joined both at physical and logical level.
    I'd like to build a report showing for a given spare part both stock and invoice information, but Answers replies it can't link Stocks with Invoices (even when I use the spare part dimension in the report).
    * I can't afford to put both fact data in a single table as I'm most likely to report on the 4 other fact tables the same way.
    * I can't either alias my dimension table, as I'd like :
    - to avoid having 6 spare part dimensions for my 6 fact table (imagine the user's face in front of that)
    - to have the filter on a spare part filtering on both tables at once (as I talk about the same spare part on both sides)
    Unless you tell me I can create an alias and then say somewhere it's actually the same dimension...
    * A colleague tried to alias the dimension and then build a 1-1 join between the dimension and its alias, but it didn't work.
    * I have tried to build a hierarchy for the spare parts with all the fact data at the lowest level, but it didn't do. I guess hierarchies are not intended to be used that way.
    * I have tried the bridge table to link the two fact tables but i get a circular path. Furthermore, as the fact tables then turn to dimensions, I'm pretty sure my aggregates won't work... I guess bridge tables are not intended to be used that way.
    * I have tried singing, dancing, jumping and bouncing around my desktop but all I got was rain.
    Can anybody catch me before I jump across the window ? I wouldn't like to get wet...
    Many thanks in advance.
    Ced.

    Hi,
    unfortunately, this purpose-built datamart was built within the company RPD. It has been deleted since then. These are the two reasons why I can't post it.
    My advice is to take the time to read the help about how to build logical tables in the Administrator tool.
    Here's a quick walkthrough:
    - create your logical tables and join them in the business model diagram
    - create dimensions (hierarchies) for all your dimension tables with at least a total level and a detail level. Thins can be done automatically by right-clicking the dimension table and selecting "Create Dimension"
    - in the dimension tables, select the source table (in the source subfolder of the dimension table) and edit its properties : in the properties dialog box, select the content tab and in front of the dimension name, select the lowest (or apropriate) logical level
    - in some complex BM (logical levels), it might also be necessary to apply similar settings to the fact table: This time, when you edit a fact table source, you will see the list of all dimensions available in the contents tab. There, for each dimension your fact table is related to, you will select the apropriate dimension level. if there isn't any join between you fact table and a given dimension, leave the logical level blank.
    I hope this helps.
    Ced.

  • Something about two fact table in one subject

    Hi all,
    when I using two fact table in one subject, it can't make sense as expected.
    The problem is describled as follows:
    1.about the RPD:
    In the presentation layer of Admin Tool, there is a mesure names "A", which is equal to B*C, come from table t1 and table t2 in logical layer respectively.
    2. In biee Answeers, I created an answeer which includes some dimesions and the mesure A, another mesuare m1.
    but in the the result pane, i saw there is no data in the the colume of mesure A, all other performs well.
    3. so, I went for the NQquery for the phisical SQL, and found that,
    in Where clause, table t2 is lost.
    why? and how can I make it?

    This sounds interesting. What would I join there? The dimension keys of the two fact tables?
    Unfortunately this Logical Table Source stuff looks quite different in Admintool 11g. What would I need to create there?
    Thanks,
    Knut

  • Confirmed Dimensions. OBIEE Not able to pull data from two fact tables.

    Hi Experts,
    I have a very simple set up of Star Schema with two fact tables and 1 dimension. Both fact tables joined to the dimension at the same level.
    When i pull a column from both fact tables and the dimension table in OBIEE, it has to create simple SQL like below:
    select FACT1.column1,
    Fact2.Column1,
    Dim.Column1
    from FACT1, FACT2, DIM
    where FACT1.ID = DIM.ID and FACT2.ID = DIM.ID
    but instead it creating a query in a very complex way:
    select case  when D1.c2 is not null then D1.c2 when D2.c2 is not null then D2.c2 end  as c2,
         D1.c1 as c3,
         D2.c1 as c4
    from
         (select FACT1.Column1 as c1,
                   DIM.Column1 as c2
              from
                   DIM T1287863,              
                   FACT1 T1287945              
       where  (DIM.ID = FACT1.ID)
           ) D1 full outer join (
            select FACT2.Column1 as c1,
                   DIM.Column1 as c2
              from
                   DIM,              
                   FACT2
              where  ( DIM.ID = FACT2.ID)
         ) D2 On isnull(D1.c2 , '1') = isnull(D2.c2 , '1') and isnull(D1.c2 , '2') = isnull(D2.c2 , '2')
    I even tried setting the levels for both the fact tables and it still creates the query in avove way. Any thoughts on this will be vary helpful.

    Subramanian,
    see below the code we're using for the RFM.
    on the ct_containers table i'm passing a line, and its getting updated after the call.
    on the ct_errors table i just want to receive the errors and i only receive the line, we add manually there ('Serious error with validation code').
    kr, achim
    FUNCTION zbapi_ra_validations .
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(IS_RA_SCREEN) TYPE  ZBAPI_S_RA_SCREEN
    *"  CHANGING
    *"     VALUE(CT_ERRORS) TYPE  ZRA_T_ERRORS
    *"     VALUE(CT_CONTAINERS) TYPE  ZRA_T_CONT_IP
      DATA:
        lo_badi_handle TYPE REF TO zra_validation_rule,
        ls_error       TYPE zra_s_error.
      GET BADI lo_badi_handle.
      TRY.
          CALL BADI lo_badi_handle->validate_rules
            EXPORTING
              is_screen_flds = is_ra_screen
            CHANGING
              ct_containers  = ct_containers
              ct_errors      = ct_errors.
        CATCH zcx_ra.
          ls_error-message = 'Serious error with validation code'.
          APPEND ls_error TO ct_errors.
      ENDTRY.
    ENDFUNCTION.
    if i call this rfm in SE37 the ct_errors table is populated with all errors and the manually created line.
    Message was edited by: Achim Hauck

  • Calculating count from two fact tables

    Hi Guys,
    My requirement,
    i have two fact table F1, F2 connected with a D1 dimension table, all table connected with a id column
    F1 ---------D1------------F2
    n 1 1 n
    i want to find out the distinct count from Fact F1 where the value also present in F2( ie. F1.id= F2.id condition).
    this measure usefull through out my project so i want create a logical column, how to create it.
    I tried this way:
    i Created two fact table in to one fact table by adding logical source, and created a logical column from existing logical source where F1.id=D1.id and D1.id=F2.Id but it is wrong
    Can any suggestion for solve my problem.
    Thanks in advance!!!

    Hi,
    You can create an opaque view in physical layer and wrire a sql like
    Select f1.id,count(*) from f1,f2 where f1.id=f2.id group by f1.id.Join this through id with dimesnion and add this fact table in LTS of your fact and use count(*) in report.
    Regards,
    Sandeep

Maybe you are looking for