Joining Facts With Different Grains to NonConfirming Dimensions - Mystery
Hi ,
Taxonomy Used is - CD stands for Confirmed Dimension && NCD stands for Non Confirmed Dimension.
I have 3 Dimensions (CD1,NCD2,NCD3) and 2 facts (F1 & F2).
==> Fact F1 can be joined to only CD1 and NCD2 dimensions. Grain of Fact F1 is same as CD1 i.e., Nbr of records matches 1 to 1 between CD1 and F1F2
==> Fact F2 can be joined to only CD1 and NCD3 dimensions. Grain of Fact F2 is CD1 & NCD3. There could be multiple records for same value of CD1 within Fact F2, and similarly there could be multiple records for same value of NCD3. But there will always be just 1 and only 1 record for combination of CD1 and NCD3.
Report Requirements:-
1) Get few Metrics from F2 and few from F1 while applying a filter on NCD2. so below columns are needed :-
Dimension Column from NCD2 || Metric from Fact1 || Metric from Fact2
So need to understand how to enforce the relationship between Fact F2 and Dimension NCD2
2) Get few Metrics from F2 and few from F1 while applying a filter on NCD2 and also Display NCD3. so below columns are needed :-
Dimension Column from NCD2 || Dimension Column from NCD3 ||Metric from Fact1 || Metric from Fact2
==> In above case it is perfectly acceptable if Metric from Fact 1 repeats again as Fact1 is at higher Grain as compare to Fact2.
Edited by: user10799880 on Apr 15, 2013 9:37 PM
Hi,
refer to this
http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.html
mark helps
thanks
Similar Messages
-
Joining Facts with Different Grains
Hello
We have a requirement where we have two facts with different grains
DEPT_FACT - Contains (Dept_Id, Dept_Name, Revenue)
EMP_FACT - Contains (Emp_Id, Dept_Name, Is_Current_Employee)
Here is some sample data
DEPT_FACT
========
1 Sales_Dept 100,000
2 Manufacturing_Dept 200,000
EMP_FACT
========
100 Sales_Dept Y
200 Sales_Dept Y
300 Sales_Dept N
400 Manufacturing_Dept N
500 Manufacturing_Dept Y
600 Manufacturing_Dept N
Our requirement is to create an OBIEE report that shows the *"Revenue/ Number of current employees in department BY Department"*
The above example must show
Sales_Dept => $50,000 (100,000 / 2 current employees)
Sales_Dept => $200,000 (200,000 / 1 current employee)
Any suggestions on how this can be done ?For me,
DEPT_FACT is not a fact. It's a dimension table because you have a one-to-many relationship and you have a measure in the dimension table (it's an aggregated measure).
And EMP_FACT is also not a fact because you don't have any measure on it.
But if we say that EMP_FACT is a fact. DEPT_FACT is an aggregated table from EMP_FACT.
I will :
* create a logical dimension for the employee with three levels (all, departement and detail)
* create a logical fact table with :
- one logical column for the revenue in the level all departement
- one logical column for the employee
and two physical source :
* DEPT_FACT with the departement level
* EMP_FACT with the level to detail
Success
Nico -
Relating facts with different grains
I'm having an issue designing a cube/star schema where I need to relate 2 fact tables that are at a different grain.
I currently have a star with 1 fact table (Insurance Premium) and 3 dimensions (Date, Account, Policy). The fact table has 1 row for each policy within each account for every quarter (quarterly snapshot). The measure is Premium.
We need to enhance this star with a new fact table that stores Lost Accounts for each quarter. The difference with this data is that we only get it at the Account Level. So the Fact table will have 1 row for each lost account per quarter. The
measure is Lost Premium.
I created the Lost Business Fact table which relates to the same Date and Account dimension as the Insurance Premium Fact table. In the cube, i created a new measure group for the Lost Premium fact table and related it to the same Date and Account
dimensions.
the 2 issues that I am having are:
1. In the Policy Dimension table, there is a field called AccountBroker, which stores the Broker for the account. So if the account has 5 policies, this table will have 5 rows and the AccountBroker field will be the same for each row. The
end users want to be able to use this field (AccountBroker) in the Lost Premium Fact table so that they can slice and dice the Lost Premium by Account Broker. The issue is that I'm not sure how to relate the Lost Premium Fact to the Policy Dimension
since the Lost Premium Fact is at Account level and the Policy Dimension is at Policy Level.
2. The other issue is that when we receive the Lost Business File for each quarter, the account may not be present in the Premium Fact because it was lost. So for example, for Q1 2014, account 1234 was lost and we receive a record in the Lost
Business File with Account 1234 as being lost and it gets inserted into the Lost Premium Fact. However, when we get the file that loads the Insurance Premium Fact for Q1 2014, this account is not present because it was lost in that quarter, so there
is no way to link the records. My first thought was to maybe take the records from the previous quarter (Q4 2012) and insert those records for Q1 2014 into the Insurance Premium Fact with 0 premium so that they exist and then there will be a match, but
not sure if there is a better design.
any ideas would be appreciated.
thanks
ScottFor me,
DEPT_FACT is not a fact. It's a dimension table because you have a one-to-many relationship and you have a measure in the dimension table (it's an aggregated measure).
And EMP_FACT is also not a fact because you don't have any measure on it.
But if we say that EMP_FACT is a fact. DEPT_FACT is an aggregated table from EMP_FACT.
I will :
* create a logical dimension for the employee with three levels (all, departement and detail)
* create a logical fact table with :
- one logical column for the revenue in the level all departement
- one logical column for the employee
and two physical source :
* DEPT_FACT with the departement level
* EMP_FACT with the level to detail
Success
Nico -
2 facts with different dimensions in 1 logical table
hello,
im trying to accomplish the set up as described per blog:
http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.html
i.e. i have 2 facts, F1: D1 ; F2: D1,D2,D3;
i followed the instructions and all seem to be working fine;
however: when i put the total on the report in Answers: D1,D2, F1, F2 then the measures from F1 that are repeated every row for D2 are being added , like regular sum on the column; this is not correct;
the only correct result i can get if manually i change the Aggregation Rule to :Server Complex Aggregate on all F1 measures;
id like to ask if this is a bug of this OBI version? 10.1.3.2
i wish not to instruct my users to change the aggregation rule; id like to have the set up via rpd such, that they dont have to manipulate the aggregation rules;
did anyone got the above working with correct totals without changing the aggregation rule?
if so, id appreciate any tips on how to achieve that
thanks
rgdsBasically, you need to :
* create your physical schema with the relationship
* drag and drop your Forecast Facts measure in the same logical table than your sales fact
* define your Forecast measure as level based measure (logical column/levels/properties) with the grain of the forecast table
Documentation
http://download.oracle.com/docs/cd/E12103_01/books/admintool/admintool_BusModSetup12.html
And you have an example in OBE series with quota in excel sheet :
http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html#t8
Success
Nico -
Join fact with another fact like a dimension
Does it work if I join fact table with another fact table as a dimention(created the dummy hierarchy and add the sum() to the measure existed in the table)?
If I pick the measure value in the fact table(which is configured like a dim), I will get the correct number? Or multiplied number?
If there is any good way of work around please let me know
Thanks
Edited by: user12077461 on Jun 29, 2011 7:39 PMHi,
You can create an Alias Table in the Physical Layer for the Fact table which you want to use as a Dimension Table. And start using the Dimension Table. And if you want any measure values to be used from the Fact, then you can extract that too.
This should simplify your work too.
Regards
MuRam -
Many to many join table with different column names
Hi have a joint table with different column names as foreign keys in the joining
tables...
e.g. i have a many to many reltnshp btwn Table A and Table B ..and join table
C
both have a column called pk.
and the join table C has columns call fk1 and fk2
does cmd require the same column name in the join table as in the joining table?
are there any workarounds?
thanksHI,
No, the foreign key column names in the join table do not have to match the primary
key names in the joined tables.
-thorick -
Join fact tables with different grain without upsetting measures?
Say I am a business analyst at a university, and I have two analytical cubes available to me: an Enrollment Cube and an Admissions Cube. The Enrollment Cube has a grain of Student and Semester, whereas the Admission Cube has a grain of Student, Application and Semester (a potential student can have more than one application in a semester). Is there any way for the OLAP developer that makes these cubes to make it so that I can use both cubes' fact tables without messing up their corresponding measures, such that I can create such analyses as the following:
County
Semester
Acceptance Rate (Admission Fact)
Retention Rate (Enrollment Fact)
County A
1
30%
88%
2
60%
87%
3
42%
84%
County B
1
90%
100%One suggestion is to create a view that joins the 2 fact tables and then create a cube with measures mapped to the view for analysis purposes. However, this would be using the measures of the new cube for the analysis.
-
Hello All,
I have the below scenario where i have Two Facts Fact Quarterly and Fact Yearly but one Time Dimension which has Quarter grain.
So my question is how do i Establish relationship from Fact Yearly to Time Dimension??
Ex:Hi naveej,
According to your description, you want to know how to build the relationship with time dimension and fact tables. Right?
Based on your screenshot, it's better to have only one fact table for sales and build the relationship with time dimension. To determine quarterly or yearly data only depends on how you slice the time dimension. However, I notice that the Revenue for year
is different from the aggregated Profit for quarters. If the Revenue and Profit are different measure, you need to have two fact tables. And you should build the relationship (Regular) between TimeDim and FactYearly on YYYY attribute.
Reference:
Defining a Fact Relationship
Best Regards,
Simon Hou
TechNet Community Support -
Using 2 fact tables with different granularity against calendar dimension
Hello gurus,
I have a requirement to provide a report to show the consumption of available capacity per month and also YTD.
I have two fact tables:
Fact table ‘Capacity’ with columns:
- Site_id
- Month_id
- Capacity
Ie.
001, 2010M01, 50
001, 2010M02, 50
001, 2010M12, 75
002, 2010M01, 60
002, 2010M02, 65
002, 2010M12, 80
Etc
Fact table ‘Consumption’ with columns
- Site_id
- Day_id
- Consumption
Ie
001, 20100101, 2
001, 20100102, 3
001, 20100131, 1
001, 20100201, 5
001, 20100212, 6
001, 20100228, 4
Etc
As can be see above, my ‘Capacity’ table contains monthly volumes, and the ‘Cunsumption’ table contains daily volumes.
My Calendar dimension is straightforward:
Year
Quarter_id
Month_id
Day_id
Ie
2010, 2010Q1, 2010M01, 20100101
2010, 2010Q1, 2010M01, 20100102
2010, 2010Q1, 2010M01, 20100103
2010, 2010Q1, 2010M01, 20100104
Etc
The MfgSite dimension is also simple:
Site_id
Site_name
Group
These are the steps I have taken sofar:
- Imported the four tables
- Created following joins:
MfgSite.Site_id = Capacity.Site_id
MfgSite.Site_id = Consumption.Site_id
Calendar.Month_id = Capacity.Month_id
Calendar.Day_id = Consumption.Day_id
- Created Business Model Diagram in BMM
- Created Calendar hierachy:
Year, Quarter, Month, Day
- Created MfgSite hierarchy:
Group, SiteName
- Setup Logical Table Source / Content settings as follows:
Fact table Capacity:
Dimension MfgSite: Logical Level = Site
Dimension Calendar: Logical Level = Month
Fact table Consumption:
Dimension MfgSite: Logical Level = Site
Dimension Calendar: Logical Level = Day
- Set Default Aggregation Rule to Sum on Logical Columns:
Capacity.Capacity
Consumption.Consumption
- Created following YTD Logical Columns:
YTDCapacity = TODATE(Capacity.Capacity, Calendar.Year)
YTDConsumption = TODATE(Consumption.Consumption, Calendar.Year)
- Created Presentaion layer
I then built a few reports to test it out and found that I have an issue with the Capacity object: When I build a simple report to show capacity per month:
SiteName, Month, Capacity
the capacity for each month is multiplied by the number of calendardays in that months, so I get
Site Month Capacity
001 2010M01 1550 (= 31 x 50)
001 2010M02 1400 (= 28 x 50)
Etc
In addition, when I add YTDCapacity to my report, the report fails with the following message:
Unable to navigate requested expression: ToDate(Capacity:[DAggr(Capacity.Capacity by [ Calendar.Year, Calendar.Month_id, MfgSite.Site_id, MfgSite.SiteName] )], [Level Year]). Please fix the metadata consistency warnings. (HY000)
Did I miss any steps? Any help is greatly appreciated!
Thanks!
Randallhi in the capacity fact table remove the level set for the calendar dim and see.
-
Join Column with different rows, is it possible?
i would like to get a result fields
- Department ID
- total employee
- position under department
Query result A
Department ID | Total employee (under department)
DeptA | 123
Dept B | 222
Dept C | 0
Query result B
Department ID | position
DeptA | programmer
DeptA | lead programmer
DeptB | salesman
Dept C | CEO
Dept C | manager
Dept C | project manager
How can i get a result by joining two tables into one by using a single query?
Department ID | position | Total employee
DeptA | programmer | 123
DeptA | lead programmer | 123
DeptB | salesman | 222
Dept C | CEO | 0
Dept C | manager | 0
Dept C | project manager | 0
ThanksHi,
<p>
has it something to do with Need to write a POWERFUL Query. Need Help from MOST Advance Query Master?
</p> -
Can we join fact to fact?
i am new to obiee i found this question in some bi sites.
” If you have 3 facts and 4 dimension and you need to join would you recommend joining fact with fact? If no than what is the option? Why you won’t join fact to fact?
i found the answer like this
o In the BMM layer, create one logical table (fact) and add the 3 fact table as logical table source.
but i didn't find the anser for Why you won’t join fact to fact?
Pleae guys help me.......................
Thans in advance.
RaniYou can join any two table which has some relationship but ideally you don't join Fact to Fact because its not a good practice and degrades performance..
Get some guidance from here http://siebel.ittoolbox.com/documents/how-to-join-two-fact-tables-14090 -
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,
KateThanks 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 -
Join fact table with higher dimension level
how do i join fact tables with higher dimension levels with discoverer?
fact with detail at level C
measure X
dimension with
D->C->B->A
E->C
level
A B C
1------1------1
2------2------1
3------2------1
join between fact X and dimension level C
X=3*C because of sum(X) in discoverer and 3xC in dimension
is there a way to get correct values for X without creating a dimension like
D->C
E->another way of asking this is whether you can create a summary table in Discoverer at a higher level than a dimension's fundamental grain. In other words - the summary examples in the documentation all describe leaving out one or more of your dimensions... they are either left in or completely taken out. But, some of the most effective summarization occurs when you summarize daily data to a monthly level. Assuming that I have a sales table (at a daily level, and a key value sales_date), and a table date_dim (primary key sales_date), I would like to create a summary sales_month_summary where the sales are grouped on month_year (which is a field in the sales_date table).
How is this done? I suspect that we can't use the date_dim table with the summary (due to the problems noted by the poster above). Do we have to create another table "month_dim"? Do we have to fold all of the desired date attributes (month, quarter, year) into the summary? Obviously we'd like to re-use all of the pertinent already existing date items (quarter, month, year, etc.), not recreate them over again, which would result in essentially two sets of items in the EUL. [One used for this month summary, and another used for the detail.]
I searched the forum - someone asked this same question back in 2000 - there was no answer provided.
The only other thought I have is to "snowflake" the date_dim into two tables and two folders, one at a date level, another at the month level. Then the detail tables can connect to date_dim (which is linked to month_dim), while the summary data can connect directly to month_dim. -
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 -
Fact table with different dates
Hello,
In my fact table I have several date columns (order date, payment date, ....) and I have only one time table in my physical model.
For example this model
Fact table
order day
payment day
Timetable
day - pk
I want to create 2 fks in order to have time analyse with order date and payment date
FK1 : fact_table.order_day and timetable.day
FK2 : fact_table.payment_day and timetable.day
validating the model, OBI tells me that i cant' t have various joins between 2 tables
Anyone know how to solve this ? (I think it is a quite common problem)
Thanks in advanceCreate an alias for your dimension Timetable and then join that with your fact table. So basically you would have 2 dimensions, one joining with order day the other joining with payment day.
Thanks,
Venkat
http://oraclebizint.wordpress.com
Maybe you are looking for
-
Is there any way to symbolicate Adobe AIR crash reports. I'm getting the following from a user of an Adobe AIR application and I've no way of figuring out what particular API is causing the bad access: Process: Eye-Fi Center [5031] Path: /Application
-
PixelBender / possible to have optionals inputs ?
Hi, i m just testing pixel bender and i 'd like to know if it's possible to set input image4 as optional argument (i didn't see that in pixel bender's doc). The effect i want to have is to composed an output from multiple sources ( couples of RGB + z
-
My Firefox icons are showing and usable from the desktop and from the task bar; however, the Mozilla Firefox does not show in my list of program files. Why doesn't it show?
-
How can I create Object Tag which supports Sun and MS JVM both.
Hi, I have created object tag as shown below <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name = "TestApplet" height="0" width="0" > <param name="code" value="com.apps.TestApplet.class" /> <param name="codebase" value="codes" /> <para
-
how can we get the data from a locked ipod touch or even how to get the passcode