Multiple Query / Fact Table question

I'm a bit new to obiee, and am trying to accomplish something that should be pretty easy.
Here is my basic table structure:
Month table (dimension)
Month Key (primary Key)
aTable (fact table)
MonthKey
NameA
totalA
bTable (fact table)
MonthKey
totalB
The goal of the report is (4 columns):
MonthKey, NameA, and totalA.
The final Column should be TotalA / TotalB
I have 2 subject areas, but since they are related I can use them together.
The problem I'm running into is that TotalB basically becomes TotalA (which it shouldn't) because of the inclusion of "NameA" from aTable.
Any ideas? Is there a way to compare queries like this, when they are not necessarily related?

Ok, behavior is different but EVENT_NO column always store the value 1, so the final result at the report is the same.
I'm interesting to know the total events by month, department and event type.
Each record at fact table represent only one event, so I can query with SUM or COUNT statment because the result is the same, but ... the performance?
Thanks

Similar Messages

  • SSAS 2008 Using multiple (three) fact tables in the same cube

    Hi, I have three fact tables in my cube,
    Actions
    Events
    Visits
    Events captures anything that happens, any transaction.  It contains parent actions and parent visits, plus other things that business deems as "actions" that change all the time.
    Actions captures a subset of Events and has its own transactional structure.  Each action has an event, but not every event has an action.
    Visits is a completely different subset of Events with a very different transactional structure from both events and actions.  Each condition can have an event, but not every event has a condition.
    These facts don't have many overlapping dimensions, perhaps a couple of outrigger look-up dimensions, like Codes and Dates.
    I am struggling to reorganize the cube in such a way that I don't have to process with errors and unknown dimension members.  Is there any specific guidance re: what to do in these situations?

    @Victor Rocca
    Some dimensions are common, like Dates and Codes, but mostly they are their own dimensions.  Visits
    and Actions facts have foreign keys from Events in them, so I would prefer to join directly, anyway.

  • Database Query & Dynamic Table Question

    Greetings all. I am using Dreamweaver CS3 and working in PHP
    with a MySql database. I'm sure the recordset I'm trying to create
    is rather simple, but for the life of me I can't figure it out. I
    have a table with peoples' names and their grades in different
    subjects. For example:
    Name Subject 1 Subject 2 Subject 3
    John D. 85 72 73
    Jane D. 90 85 70
    John S. 70 92 85
    What I'm wanting is a page with a dynamic table for the
    person that logs on to see their grades in each subject if it's
    above an 80. I already know how to pass the username session
    variable, but I'm not sure how to say "show subject if value is
    greater than or equal to 80." So, for example, if John D. logged in
    the table would look like:
    Subject 1 80
    If Jane D logged in, her displayed dynamic table would look
    like:
    Subject 1 90
    Subject 2 85
    So, I want the table to show the header name (subject) and
    the grade if the grade >= 80. Any ideas on how to solve my
    dilemma would be greatly appreciated. Thank you in advance.

    Thank you for the reply. I was thinking about doing the
    separate table idea, but there are something like 50 subjects, and
    I already have the rest of the site built around my current table
    structure. I think it would be more trouble than it's worth to
    change everything. I'm rather new to PHP, so if you don't mind
    helping out, how would I setup the code to say "ok, here's a query
    with every subject and name, now pull only the subjects with a
    score >= 80 for person A (generated by a URL variable)?" What
    I'm envisioning is a repeating table with Subject (if >=80) on
    the left, and the actual score on the right. The query I'm using to
    pull the scores for the logged in person is
    SELECT Name, Subject 1, Subject 2...
    FROM Grades
    WHERE Name = colname
    colname = $_GET['Name'] (my url variable)
    This works just fine to pull ll grades for all subjects for
    just the person who logged in. I'm not sure how passed this point
    to a) filter the subjects by a value, and b) list those subjects
    and grades in a vertical repeating table. Thank you again for your
    help.

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

  • Conformed dimension and query multiple fact tables

    Hello,
    Please if someone can guide me on this requirement.
    Requirement - I have a conformed dimension D1 and two fact tables F1 and F2. Both fact tables have many columns so I cannot merge
    the two fact tables into one logical table. Currently both these fact tables have logical tables F1 and F2 respectively.
    As per design the conformed dimension is a simple logical table in the rpd and not a dimension.
    Can someone guide me how should i proceed so that i'll be able to fetch information from both the fact tables?
    Edited by: 930542 on Apr 26, 2012 12:28 PM

    Hi,
    Currently the dimension table is taken as a simple logical table in rpd as it does not have have any levels or hierarchy.
    Its a flat dimension. Can you guide me how can I implement a flat dimension in OBIEE? Because this dimension is taken as simple logical table
    I am not able to set appropriate level for fac tables. This dimension does not appear in the list of dimensions.

  • Join multiple fact tables and dimensions and use all tables in report issue

    Hi,
    I have a report requirements and need to use multiple fact tables and unconformed dimensions as described below
    Fact table: F1,F2,F3
    Dimensions tables: D1.....D9
    F1:(joined to) D1,D2,D3,D4
    F2::(joined to)D1,D2,D5,D6
    F3::(joined to)D1,D2,D7,D8
    D7::(joined to)D9,D8 (dimension D7 joined to two other dimensions D9 and D8
    I'm trying to use columns from almost all the fact and dimension tables but getting "Unable to navigate requested expression. Please fix the metadata consistency warnings."
    Repository is consistent and no errors and warnings.
    How can I configure the repository to develop reports using all fact tables and dimensions?
    Appreciate for your help.
    Thanks
    Jay.
    Edited by: Jay on Feb 9, 2012 4:14 PM

    So you want me to convert snowflake schema to star. does it solve my problem? individual star queries are working find but when I query multiple stars together getting inconsistency errors. I removed content tables dim level totals for unconformed dimensions in logical fact LTS and set level for measures at total level for unconformed dimensions. it is still in progress and need to test.
    Thanks
    Jay.

  • Multiple granular levels for fact table

    My fact table has to incorporate both at Transaction level and Accumulative , my basic design for Transaction level is as follows
    CUSTOMER_KEY, LOAN_KEY, TIME_KEY, LOAN_AMT, TOTAL_DUE, LOAN_STATUS, TRANSACTION
    9000,1000,1,200,200,Open, Advance
    9000,1000,1,200,0,Close, Payment If I aggregate the values then query will take time to execute . How can I provide cumulative information from this fact table? shall i go for one more fact table for Accumulative information ?
    Please suggest.
    Thanks,
    Hesh.

    Hi ,
    Is it a question of OLAP cube generation using your fact table design ? If not then it is incorrect forum ..If yes , then it should be straighway ur fact and dimension design and no need of another fact table with aggregation because OLAP cube aggregate this which should ideally be tremendous fast
    Thanks,
    DxP

  • Multiple fact tables using one measure

    Hi Experts,
    Multiple fact tables using single measure .For example Measure name is amount . This measure is using 5 fact tables. By using this info , i have to create bmm layer document . In bmm layer documents columns are like logical table name ,column name, logical sourc name . could you please help me out to draft the document ?

    Hi ,
    My question is five fact tables are there, day level two different fact tables , period and week fact tables are there .
    Above all tables are using single measure . how to design these fact tables with measure in bmm layer ?
    Please kindly give reply .
    Thanks in advance.

  • Reg: Using Multiple fact tables in the RPD!

    Hello everyone,
    Can I get some help with the following scenario?
    We use OBIEE 11g.
    We have a report that uses only 1 fact table to retrieve the data and it takes hell lot of time to bring up the data in the report.
    My question here is is there a way to bring up the performance of the report if we split the data in 1 fact table to 2 fact tables and make the report use the 2 fact tables.
    Are there any other ways of tuning the report for better performance.
    Thanks for the help in advance!
    Ajay.

    Hi Ajay,
    Follow the following steps for the tuning;
    1. Try to tune the SQL query first generated by the report, and make necessary changes. (Put indexes on required column so that your query is scanning the index instead of entire table)
    2. You can try to create agg fact table and use the agg navigation for improving the performance. (Idea is to reduce the data set on which sql is fired)
    3. You can try to create partitions on the FACT table in the DB and so that required partitions are queried as per filters.
    4. In the Last if all the above doesn't tune your query you can try splitting the FACT table in to TWO or More as per your decision and then use fragmentation content in the BMM layer of the RPD so it will hit appropriate tables as per you report.
    Mark Correct/Helpful if it helps.
    Best of Luck,
    Kashi

  • Can a measure map to multiple fact tables

    Hi Experts,
    Can A Measure in an Universe map to multiple fact tables? For example, we have sales detail table by day and store and product, and have sales summary table by day and region and (product) department. We like to create a measure to map to both detail table and summary table. When I run query includes store and product,  the query will automatically use the sales detail table; and query can automatically choose the summary table when it only includes region and department. Our database table could be in  Teradata and Oracle. Can we achieve it and how? If a measure can't achieve this (dimension awareness), what the other option we can have and how to do it?
    Thank you,
    Richard

    Hi Sion,
    After I make the tables incompatible with the dimension objects on different levels, the measure can point to the right table if my query only include Store and Product or only include Region and Department. But in some scenario, the business could ask to include both Store and Region or Item and Department in same query. The current approach doesn't work on this further request. In our database, we have store table including Region with other higher level organization information, Product table including Department with other higher level product information, and we also have separated Region table and Department table. Could we make the objects more flexible u2013 query will be against aggregation sales table if dimension objects in query are only on higher level and will against detail sales table if some of dimension objects are on high level and some on low level? 
    Many thanks,
    Richard

  • How can build BMM with multiple fact tables

    HI Gurus,
    I have 4 fact tables and 18 Dimension table. Dimension tables have links with multiple fact tables. i have created physical joins in Physical layer. Now my questions is how can i create Business Model with multiple fact tables.
    i mean should i create 4 fact tables as logical tables and logical keys ? Then i have to move all dimension tables in to Business model?
    i am new to OBIEE. i gone through tutorial it is showing with one fact and multi dimension table. Should i do follow same style with multi fact tables.
    Please help me. Thanks in advance for your support.

    Thanks for your response.
    I had drag all tables from the phisical layer to Business Model. then i have deleted all links and recreated complex joins with default values.
    now i have some revenue amont columns in fact tables.
    my question is should i should i create aggregation ( like Sum..) for those columns? is it must ?
    please let me know thank you very much

  • Get the master table value based on multiple fact tables

    I have an master table which has to filter data based on multiple fact tables
    In the below sample, i need to get the list of MasterTable SId in an single query for fetching data from all the fact tables with an criteria.
    Can u let me know the single query to handle the below situation
    Select count(1) from dbo.DimMaster where sid in
    (Select Master_sid from dbo.factsales where SalesDate < '20141231')
    Select count(1) from dbo.DimMaster where sid in
    (Select Master_sid from dbo.factPurchase where PurchaseDate < '20141231')
    Select count(1) from dbo.DimMaster where sid in
    (Select Master_sid from dbo.factSalary where SalaryDate < '20141231')
    Select count(1) from dbo.DimMaster where sid in
    (Select Master_sid from dbo.factMarket where MarketDate < '20141231')
    ShanmugaRaj

    Please try below:
    SELECT
    (SELECT count(1)
    FROM dbo.DimMaster
    WHERE sid IN (
    SELECT Master_sid
    FROM dbo.factsales
    WHERE SalesDate < '20141231'
    )) as C1,
    (SELECT count(1)
    FROM dbo.DimMaster
    WHERE sid IN (
    SELECT Master_sid
    FROM dbo.factPurchase
    WHERE PurchaseDate < '20141231'
    )) as C2,
    (SELECT count(1)
    FROM dbo.DimMaster
    WHERE sid IN (
    SELECT Master_sid
    FROM dbo.factSalary
    WHERE SalaryDate < '20141231'
    )) as C3 ,
    (SELECT count(1)
    FROM dbo.DimMaster
    WHERE sid IN (
    SELECT Master_sid
    FROM dbo.factMarket
    WHERE MarketDate < '20141231'
    )) as C4
    -Vaibhav Chaudhari

  • Joins with multiple fact tables

    Hi Experts,
    i have one doubt in joins
    we have two dimensions D1 and D2,
    D1 is having A1 and A2 columns
    D2 is having B1 and B2 columns
    two facts F1 and F2 these are joined like D1 to F1 D1 to F2 and D2 to F1, D2 to F2
    D1----->F1
    D1------>F2
    D2-------->F1
    D2-------->F2
    if i selected A1 and B1 in a request from which FACT table will get the data and why can you please explain
    please help me
    reg,
    Jell

    Hi All,
    I have a similar requirement where I have 4 multiple fact tables and we can't combine all those facts into one single fact table. In that case how can a query work with multiple common and uncommon dimensions and measures from multiple fact tables, if it doesn't work that way - can you please explain how can we expect a query to work with multiple fact tables.
    For eg: D1– Dim
    D2 – Dim
    D3 – Dim
    D4 – Dim
    F1 –Fact
    F2 – Fact
    F3 – Fact
    D1 -> F1
    D2 -> F1,F2
    D3 -> F2
    D4 -> F1, F3
    In this case if we want to query from D1,D2,D3, F1, F2 or D1,D2,D3,D4,F1,F2,F3. Kindly please explain how it can be modeled in BMM or what are the limitations. I have done with two fact tables in past and didn't had issues but this is kind of a vast implementation. Your help is appreciated.

  • Physical query not accessing Fact Table/Column

    Hi,
    I'm facing a weired issue. I have a report with 32 columns. 22 columns are from 8 dimensions and 10 columns from 3 Facts.
    But while observing the Physical query. Its not touching 1 particular Column coming from 1 Fact Table.
    So, in the query only 2 Fact columns are there and in the report its always Null value.
    When I'm adding a filter on that Fact Column to force Analytics to go and join with that Fact Table, Its not including that Fact Table/Column and producing a very funny query like the following:
    SELECT
    COLUMNS....
    FROM
    TABLES (8 DIMENSION AND 2 FACTS)
    GROUP BY COLUMNS....
    HAVING cast(NULL as DOUBLE PRECISION )>1234
    ================================
    "cast(NULL as DOUBLE PRECISION )>1234" - this is the filter, I have added on that Fact Column.
    Note- It may be because of RPD configurations/joins. But the system (Siebel Analytics 7.8) is in production for 2 years and 500 users using it and nobody reported any issue like this before.
    Can anyone please give me some helpful hint, idea, what is happening?
    Thanks in Advance
    Regards
    Sudipta

    Hi Kishore,
    Thanks for your reply.
    However, I did the analysis and found following, please let me know if your perspective is falling in the same line or not.
    Scenario:
    Suppose all the columns i'm trying to fetch, are coming from 5 dimensions [d1,d2,d3,d4,d5] (some of them are aliased table) and 3 fact tables [f1,f2,f3]
    Now, the report is not fetching data for c1 column which is coming from f3 fact table. Even f3 table is not included in the physical query.
    Now what i found that, there is a dimension suppose d3 which is not having any direct join with f3, but other facts like f1,f2 have joins with d3 table.
    If i remove the columns coming from d3 dimension from report, then f3 fact columns are getting populated in report.
    Problem:
    I need to provide a single physical query for that report, while those report columns are defined by the business.
    Questions:
    1. So is it really possible to create a query for that kind of report without changing the RPD design?
    2. If no, then is the only solution to split that report (i'm thinking) into 2-3 sub reports?
    Thanks all of you for replying and providing your thoughts.
    Regards
    Sudipta

  • Best way to combine multiple fact tables in single mart

    Hi, quick question that I think I know the answer to, just wanted to bounce it off everyone here to make sure I'm on the right track.
    I have a HR datamart that contains several different fact tables. Some of the facts are additive across time (i.e. compensation - people get paid on different days, when I look at a month I want to see the total of all pay dates within that month). The other type of fact is more "status over a set of time" - i.e. a record saying that I'm employed in job X with a salary of Y from a given start date to a given end date.
    For the "status over time" type facts, if I choose January 2009 (month level) in the time dimension, what I'd really like to see is the fact records that were in place "as of" the last day of the month - i.e. all records where the start date is on or before 1/1/2009, and whose end date is on or after 1/1/2009. Note that my time dimension does go down to the day level (so you could look at a person "as of" the middle of the month, etc. if you're browsing on a day-by-day basis)
    I've set up the join between the time dimension and the fact table as a complex join in the physical layer, with a clause like "DIM_DATE.DATE >= FACT.START_DATE AND DIM_DATE.DATE <= FACT.END_DATE". This seems to work perfectly at the day level - I have no problems at all finding the proper records for a person as of any given day.
    However, I'm not quite sure how to proceed at the month level. My initial thought is:
    a) create a new LTS for the fact table at the month level
    b) in the new LTS, add the join to the time dimension
    c) in the new LTS, add a where clause similar to LAST_DAY_IND = 'Y' (true for the last day of each month).
    Is this the proper way to do this?
    Thanks in advance!
    Scott

    Hi Scott,
    I think you're on the right track but I don't think you need the last part. Let me generalize the situation to the following tables
    DAILY_FACT (
    DAILY_FACT_KEY NUMBER, -- PRIMARY KEY
    START_DATE_KEY NUMBER, -- FOREIGN KEY TO DATE DIMENSION FOR START DATE
    END_DATE_KEY NUMBER, -- FOREIGN KEY TO DATE DIMENSION FOR END DATE
    DAILY_VALUE NUMBER); -- FACT MEASURE
    MONTHLY_FACT(
    MONTHLY_FACT_KEY NUMBER, -- PRIMARY KEY
    MONTH_DATE_KEY NUMBER, -- FOREIGN KEY TO DATE DIMENSION, POPULATED WITH THE KEY TO THE LAST DAY OF THE MONTH
    MONTHLY_VALUE NUMBER); -- FACT MEASURE at MONTH LEVEL. DATE_KEY is at END of MONTH
    DIM_DATE(
    DATE_KEY NUMBER,
    DATE_VALUE DATE,
    DATE_MONTH VARCHAR2(20),
    DATE_YEAR NUMBER(4));
    DIM_DATE_END (ALIAS OF DIM_DATE for END_DATE_KEY join)
    Step 1)
    Make the following three joins in the physical layer:
    a. DAILY_FACT.START_DATE_KEY = DIM_DATE.DATE_KEY
    b. DAILY_FACT.END_DATE_KEY = DIM_DATE_END.DATE_KEY
    C. MONTHLY_FACT.DATE_KEY = DIM_DATE.DATE_KEY
    Note: The MONTHLY_FACT DATE_KEY is joined to the same instance of the date dimension as the START_DATE_KEY of the DAILY_FACT table. This is because these are the dates you want to make sure are in the same month.
    Step 2)
    Create a business model and drag DIM_DATE, DAILY_FACT and DIM_DATE_END into it.
    Step 3)
    Drag the physical table MONTHLY_FACT into the logical table source of the logical table DAILY_FACT.
    Step 4)
    Set DAILY_VALUE and MONTHLY_VALUE to be aggregates with a "SUM" aggregation function
    Step 5)
    Drag all required reporting columns to the Presentation layer.
    Step 6)
    Create your report using the two different measures from the different fact tables.
    Step 7)
    Filter the report by the Month that joined to the Start Date/Monthly Date (not the one that joined to the end date).
    Step 8)
    You're done.
    The act of combining the two facts into one logical table allows you to report on them at the same time. The strategy of joining the START_DATE_KEY and the MONTH_DATE_KEY allows you to make sure that the daily measure start date will be in the same month as the monthly fact table.
    Hope that helps!
    -Joe
    Edited by: Joe Bertram on Jan 5, 2010 6:29 PM

Maybe you are looking for

  • Dunning - ST22- Exception in GET_DUNNING_CUSTOMIZING FM.

    Hi Experts, Issue is, When the user ran the Dunning report on July 16th, (selection criteria is--> July 16th & From customer 1 TO customer 999999999), bcoz of some thing, at CUST_444, the Exception was raised (say, for customers CUST_111, CUST_222, C

  • Populating the G/L account field based on Material in the SC

    HI aLL,    We are runnin on SRM 4.0 (classic).I have a reqt wherein the G/L account which comes in the "Cost assignment details" should be populated at run time (when items are added to SC) based on the material no/Product ID....   I found out a BADI

  • Airport network and sharing Internet connection

    Hello all, I have hit this problem with sharing an internet connection on an airport network. Maybe its a simple fix, maybe it a "can not be done", answer. My set up may be a little hard to describe. To explain, completely wireless set up in my netwo

  • Launching and shut down concerns

    today as i was shutting down my PB the screen turned blue and the little clock like animation popped out and my notebook never shut down. being in a hurry i just shut the monitor hoping it was gonna be alright since i was in a hurry. it is a fact tha

  • Building installer requires CD read

    Why is it when I build an installer it prompts me to load the distribution and driver CDs? Shouldn't all this be available on my hard drive already? See attached screenshot. Attachments: INSTALLER.JPG ‏75 KB