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?

Similar Messages

  • Bridge Table between two fact tables

    Hello everybody,
    From what I have read on the BI Administration tool help and on this forum, bridge tables are used to define many-to-many relations between dimension sand fact tables. Is it possible to have a bridge table defining a many-to-many relation between two fact tables?
    Here is my senario:
    1. We have a fact table called fact_Orders describing orders for some products.
    2. We have a fact table called fact_Sales describing sales og these products.
    3. We have a table describing the transformation from order lines to sales lines which is a many-to-many relation, because it is possible to transform an order in more than two steps.
    I was thinking of connecting the two fact tables with a bridge table.
    If bridge tables are inappropriate for this case, what could be a better model for my senario?
    Thanks for your time.

    Hi,
    Well a conformed dimension is a bridge table between two facts, so not sure why you need anything else. If there is a one to many from D1 to F1 and a one to many from D1 to F2 then effectively there is a many to many join from F1 to F2 through the D1 dimension.
    Sounds to me like all you need is an order dimension table, rows in the orders fact table will join to this dimension and so will rows in the sales fact table. You can then do calculations like number of sales per order, total sales revenue per order, # of order items per order etc etc.
    Regards,
    Matt

  • Connection between 2 fact tables

    Hello guys!
    Suppose the following situation (it's a simplified one, of course):
    1) I have a dimension table d_contract with a list of contracts (and some attributes of a contract like its term and type). The primary key is ID_CONTRACT
    2) I have a fact table f_payments which contains payments for all contracts. It contains fields: ID_CONTRACT, AMOUNT_PAYMENT, DATE_OF_PAYMENT, ID_SALESROOM (so a measure is AMOUNT_PAYMENT: its default aggregation rule is set to SUM). Each contract can have many payments in different salesrooms.
    3) I have a dimension table d_salesroom with a list of all salesrooms (and some attributes of a salesroom like its address) where payments can be installed. The primary key is ID_SALESROOM
    4) I have a fact table f_calls which contains all phone calls (in tech support) regarding contracts. It contains fields: ID_CONTRACT, DATE_OF_CALL, DURATION_OF_CALL (so a measure is DURATION_OF_CALL: its default aggregation rule is set to SUM). Many calls for each contract can be done.
    Those were physical tables, and logical tables are the same. Connections between tables (physical and logical) are quite obvious: f_payments is connected with d_salesroom and d_contract, f_calls is connected with d_contract only.
    Then I want to run the following request (in Answers):
    ID_SALESROOM | ID_CONTRACT | SUM(AMOUNT_PAYMENT) | SUM(DURATION_OF_CALL)
    That is: for all salesroom I want to see all contracts (which were paid in the salesroom) and for each contract I want to see sum of payments (in the salesroom) and duration of all calls for that contract (not regarding the salesroom). If a contract was paid in more than one salesroom then the duration of calls should be the same for all salesrooms - duration is connected only to a contract, not to a salesroom.
    If I write this request in answres, I get zero call duration for all contracts. And in request log I see an expression CAST(NULL as INTEGER) instead of SUM(DURATION_OF_CALL). I suspect this is because d_salesroom isn't in any way connected with f_calls (neither physically nor logically). But what to do if I want a query like the above one to run correctly?
    What can I do with the repository to perform queries like that?

    Hi AFSK,
    d_contract is common dimension b/w two facts so in f_cells LTS add d_contract and f_payments into single source
    then your query will generated in the following way
    select a.Id_salesroom,b.Id_contract,c.Sum(Amount_payment) ,d.Sum(Duration_of_call) from
    d_salesroom a,d_contract b,f_cells c,f_payments d
    where a.Id_SalesRoom=d.Id_SalesRoom and a. Id_Contract=d.Id_Contract and a.Id_Contract=c.Id_Contract
    group by a.Id_salesroom,b.Id_contract
    hope it helps you

  • SSAS 2008 Linking two cubes on the foreign key between two fact tables

    Hi, all -- 
    I have two cubes:
    Cube 1 has Fact1 (F1, "Events") and 3 dimensions (D1, D2, D3)
    Cube 2 has Fact2 (F2, "Sales") and 3 dimensions (D4, D1, D6)
    As you can see, two cubes reuse D1 as their common dimension.  In addition, F2 foreign keys into F1, e.g. F1 is "Events", and F2 is "Sales".  Every "sale" is an "event", but not every "event" is
    a "sale".
    The question is, how to I link the two cubes and their two respective fact tables on the foreign key?
    Thanks, Austin.

    Hi Austin,
    According to your description, you want to retrieve data from two different cubes, right? In Analysis Services, to query multiple cubes from a single MDX statement you can use the LOOKUPCUBE function (you can't specify multiple cubes in your FROM statement).
    The LOOKUPCUBE function will only work on cubes that utilize the same source database as the cube on which the MDX statement is running. For the detail information about it, please refer to the link below to see the blog.
    Retrieving Data From Multiple Cubes in an MDX Query Using the Lookupcube Function
    If I have anything misunderstood, please point it out.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Best way to connect two fact tables when no conformed dimension exists

    Can anyone please elaborate how would I connect two fact table without any conformed dimension. Let say FACTA, FACTB. FACTB is related to a dimension "StatusDim". I want to select the count of all FACTA item which are related to FACTB items with
    a particular status. I have found the following article but just wondering whether it is the best practise to connect two fact tables directly.
    http://bifuture.blogspot.com/2011/11/ssas-selecting-facts-with-reference.html
    Thank you

    Hi Ahsan,
    After read the blog you posted, I think it's a pretty good solution to create a view in the relational database or a named query in the Data Source View containing as the the columns in FACTA and FACTB. Then build a dimension from it, setting the "Null processing"
    property (you have to click the "plus" two times for the "Key Columns" property of the attribute in BIDS to access this property) to "UnknownMember". And then use this dimension for the many-to-many relationship. Dimensions from FactA can benefit of the reference
    relationship between FactA and FactB and therefore a powerful solution it is.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • 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

  • 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

  • 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

  • Joining two fact tables for subject area

    When I tried to use two simple fact tables joined by a dimension, I am getting the “ No fact table exists at the requested level of detail” error in the answer when I try to pull the columns from Fact 1 and Fact 2 tables. I have set the content in both the fact table to lowest granularity of dimension with CUST_ID, RAT_ID, ACT_ID keys. We have one to many relationships between dimension and both the fact tables. Any feedback is highly cherished.
    Fact1: keys are: CUST_ID, RAT_ID, ACT_ID, YEAR
    Fields are CUST_ID, RAT_ID, ACT_ID, YEAR , Rev1, Transaction Date
    Fact2: keys are: CUST_ID, RAT_ID, ACT_ID, YEAR
    Fields are CUST_ID, RAT_ID, ACT_ID, YEAR , Rev2, CreationDate
    Dimension keys are CUST_ID, RAT_ID, ACT_ID
    Thanks,
    uday

    Hi LC,
    We have to add two fact tables F1 AND F2 to an existing bmm. These fact tables have history tables F11 AND F22 and we have to use partition logic for this.How you did partition ? you should be using Fragmentation logic for that any how you will add the F11/F22 tables to F1 and F2 LTS , so when you join F1 & F2 to the common dimension then it should work for the calucluated measures but dont forgot to create hierarchies and specify the content levels for the fact tables
    Thanks,
    Saichand

  • Multiple 'logical joins' between a fact table and one dimension table

    It appears that one cannot create multiple ‘logical joins’ between a fact table and one dimension table in OBIEE using the Oracle BI Administration Tool. For example, considering a Business Model with a dimension table TIMES and a fact table FACT containing START_TIME and END_TIME, we would like to create separate logical joins from FACT to TIMES for the START_TIMEs and END_TIMEs? Obviously, the underlying foreign keys can be created, but as far as I can tell the Oracle BI Administration Tool doesn’t support this. The workaround would be to replicate the TIMES table, but that’s ugly.
    I seek an alternative approach.

    Try this. Create an two aliases for the TIMES dimension (Start & End) in the Physical Layer and then remove foreign key to the "Parent" Times dimension. Create the Foreign Key in the Physical Layer to the new aliases and then create the complex joins in the BMM Layer to the new aliases as well. This will allow you to present both dates within the same table in the Presentation Layer. Not the most elegant solution but it works.

  • 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

  • Gprs connection between two mobile phones

    Hi
    is it possible to make a gprs connection between two mobile phones without a server(pc...)? when the answer "yes" please give me an exapmle...

    I'm not sure, I'm just connecting some facts. I'm talking about Siemens S55. It has implemented sockets (both client sockets and server sockets). The phone, when connected via GPRS has IP address (Siemens' netmonitor reports it..). But i've never tried to use server-socket on my mobile.
    So it seems that it is in fact possible on some handsets. (AFAIK nokia 6610 and similar does not support sockets...)

  • Relationship between two facts

    I have 2 fact tables (Encounter and Visit) which have an optional 1 to many relationship.  For a query the users are trying to run, they are using DepartmentDim, which is related to both facts, and AppointmentStatusDim, which is related ONLY to VisitFact.
     They want to see a count of encounters by department and appointment status.  The problem is when they pull in the count from the Encounter measure group, it is showing the same count for all of the values in each row.  
    How do I need to create the relationship between the two fact tables so that I can use dimensions that are related to only one fact table but pull in a measure from the other fact?
    Any help is appreciated.
    Thanks,
    Andy

    Sounds like you need a bridge table to complete the M2M relationship...
    FactVisit
      DepartmentKey
      AppointmentStatusKey
      EncounterGroupKey
    FactEncounter
      DepartmentKey
      EncounterGroupKey
    BridgeVisitEncounter
      EncounterGroupKey
    DimAppointmentStatus <-- FactVisit --> BridgeVisitEncounter <-- FactEncounter 
    This will allow you to slice measures in the FactEncounter measure group by attributes in the DimAppointmentStatus dimension...
    BI Developer and lover of data (Blog |
    Twitter)

  • 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

  • How to make a connection between two wireless sensor networks of different groups through gateway?did any external device or coding is needed?

    my objective is to make a connection between two wireless sensor networks....i am using two nodes and one gateway for each wireless sensor network.....what is the procedure for connecting these two wireless sensor networks of different groups

    my objective is to make a connection between two wireless sensor networks....i am using two nodes and one gateway for each wireless sensor network.....what is the procedure for connecting these two wireless sensor networks of different groups

Maybe you are looking for