How to handle Fact tables with different granularity in OBIEE 11g RPD
Hello Everyone,
I have got stuck here and need your help.
I have two fact tables (Say F1 and F2... F1 is containing data at month-level and F2 is containing data at day level) and one Date DIMENSION TABLE. Date_Code is the PK of Date dimension table.I need to use time-series functions also.
Can anyone tell me how to model this requirement in the RPD.
Can we use a single dimension table(Here Date dimension table) with two fact table of different grainularity? What would be the best way to implement this requirement?
Thanks in advance :)
Hi Veeravalli,
Thanks for your reply :)
Let me explain the problem in more detail. I have one Date dimension(Date_Code,Month_Code,Quarter_Code,Half_Year_Code,Year_Code). Here Date_Code is the PK.
In F1---->Date (Using Month_Code key)
F2-------->Date (Using Date_Code Key)
Level based hierarchy is there starting from Year to Date.Each level has PK defined and chronological key selected.
F1 has level set to Month and F2 has level set to Day.
Now if i am using ago() function on measure of F2 (having day level data) then it's working fine but if i am using ago() function on measure of F1...I am getting an error at Presentation service: Date_code must be projected for time-series functions.
So the whole issue is with time-series functions. As per my research...I think for time series the tables in the physical model containing the time dimension cannot join to other data sources, except at the most detailed level but here i am joining with F1(using Month_Code which is not the most detailed level).
So kindly let me know how to achieve this in rpd?
Similar Messages
-
Fact tables with different granularity
We currently have 3 dimensions (Site, Well, Date) and 2 fact tables (GasEngine, GasField), both having granularity of a day.
GasEngine is linked to Site and Date
GasField is linked to Site, Well and Date
We now have a requirement to make the GasEngine fact table have granularity of an hour but keep
GasField at a day.
We therefore must include a new Time dimension, which would only be linked to GasEngine.
Is it ok to have a DW with these two fact tables having different granularity?
And would we therefore require two separate cubes for querying this data?Hi Rajendra and Visakh16,
Based on your input provided to this thread, I would like to ask a question just to fine-tune my knowledge regarding data modelling. In Darren’s case I guess his date dimension only store dimension records up to day level granularity. Now the requirement
is to make the “GasEngine” fact table to hold data granularity of an hour.
Now based on Rajendra’s input
“Yes, you can have. but why you need new time dimension, I recommend, make GasEngine fact to
hour granularity.”
How Darren could display data for each hour without having a time dimension attached to GasEngine fact table? With the existing date dimension he ONLY can display the aggregated data with the minimum granularity of day level.
Now anyone can modify the date dimension to hold time records which will complicate the date dimension totally. Instead why Darren cannot have a separate time dimension which hold ONLY time related data and have a timekey in GasEngine fact table and relate
those tables using the time key? This way isn’t Darren’s data model become more readable and simplified? As we provide another way of slicing and dicing data by using a time dimension I do not think Darren’s cube becomes a complex STAR schema.
I could be totally wrong therefore for the sake of knowledge for Darren and me I am asking the question from both of you.
Best regards…
Chandima Lakmal Fonseka -
Fact table with different granularity
I have a fact table , the measure with different granualrity , for example, there are a fact table named project, and in the project , there are some columns measure like project value, Opportunity value, (one opporuntity have many project). so I have to sum the project value and Opportuntity value
by month, how to sum opportuntity value? (I want to sum the value distinct Opportuntity ). anyone have suggetion. thanks in advance.The purist answer is that you should NEVER have a fact table with multiple levels of granularity - it's asking for trouble. Better solution is to split off a new fact table at the proper level of granularity. Having said that, I've worked with BI Apps before so I understand the pain you're going through. In the long run though we found it better to add new fact tables and track the data at the proper levels. Less confusing (long run) than trying to kludge round data to fit in a square fact table.
Thx,
Scott -
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.
-
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 -
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 -
How to implement fact tables with finest level of detail (fine-grained)?
Hi,
Maybe this is basic knowledge what I'm asking here... I don't know, well, here it goes:
I need to know the way carry my transactional data to a fact table, but keeping the finest level of detail possible (namely, the transactions). I implemented my cubes with MOLAP option for storage (those were the specs that I had to follow) so I can't add a unique constraint to those structures.
I only seem to be able to load aggregated, precomputed data. If I wanted to load the transactions (after the data has been transformed and clenased) where should I do it?
I tried to implement a version of the fact tables as ROLAP but got nowhere (I couldn't add a unique constraint or index on that column either).
I would really, really appreciate your help.
Best Regards,
osvaldo.
[osantos]Hi Veeravalli,
Thanks for your reply :)
Let me explain the problem in more detail. I have one Date dimension(Date_Code,Month_Code,Quarter_Code,Half_Year_Code,Year_Code). Here Date_Code is the PK.
In F1---->Date (Using Month_Code key)
F2-------->Date (Using Date_Code Key)
Level based hierarchy is there starting from Year to Date.Each level has PK defined and chronological key selected.
F1 has level set to Month and F2 has level set to Day.
Now if i am using ago() function on measure of F2 (having day level data) then it's working fine but if i am using ago() function on measure of F1...I am getting an error at Presentation service: Date_code must be projected for time-series functions.
So the whole issue is with time-series functions. As per my research...I think for time series the tables in the physical model containing the time dimension cannot join to other data sources, except at the most detailed level but here i am joining with F1(using Month_Code which is not the most detailed level).
So kindly let me know how to achieve this in rpd? -
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.
-
How to handle same product with different part numbers and pricing in SAP.
I am a new user and want to learn if the following scenario can be handled by SAP.
Our business buys a product from a supplier which has 2 different part numbers and prices. It is the same product. One is the primary product whilst the other is available only as an upgrade option with a different part number to a mainline product at a cheaper price .
Our issue is that we sometimes buy the upgrade option with a mainline product to get the better price even though these go into stock. Basically we need to have the items linked with both part numbers in SAP at different prices but inventory both in and out only going against the primary part number. Any ideas?Thanks Jitin
I did give them different part numbers and then attached a Bom containing the primary part number against the upgrade option however I really need to have the secondary item as a sales and purchase item but non inventory so the stock comes from the primary part. Ideally if we receipt the goods in as the secondary number the inventory goes to the primary part. If the second number is an inventory item then I have the issue of the same part with different part numbers sitting in stock at different prices and having to rely on employees understanding the difference.
Sorry to be so confusing. I will do some more testing over the weekend and see if I can find a suitable solution.
Thanks
Martin -
Quality info records: how to handle same supplier with different sourcing
hi all
I have material which comes from same supplier but different sourcings: as in I have one vendor supplying it but it can come from different sites; as some sites might be approved and others not, how can I differentiate that?
thanks
AlisaYou need to use the MPN profile functionality that is a standard part of SAP.
In Config under the purchasing define the MPN profile. There are several options you can turn on/off including info records.
You assign the MPN profile to your material. It now is considered by SAP to be an internal material number.
You then create a HERS material type for each separate manufacturer material number you have. You only need the purchasing view for these materials. You can also create purchasing text views, classification and some others if you wish.
In the SAP approved vendors list (AVL), you then assign each manufacturer vendor(s) with the HERS material created.
You create a Q-info record for each manufacturer/HERS material combination.
Now, when you specify the internal material number in a PO, the system will tell you to order the MPN material. When you do the drop down for the material now, it will show you the approved manufacturers allowed in the AVL for the ordering plant.
When the 01 inspection lot is created you will have a vendor number as well as a manufacturer's number in the inspection lot. The DMR can be done by the manufacturer or the vendor depending on how you set up the inspection plan. Q-info record will be used accordingly.
Take a look at it and research it. It's not hard to set up.
FF -
Fact tables with common and uncommon dimensions
Hi -
I have 2 facts:
F1 with Dimensions D1, D2, D3, D4
F2 with dimensions D1, D2, D5, D6
If I create a report with F1, F2, D1, D2 then 2 queries are created and the report is correct. Why am I not able to create a report with F1, F2, D1, D2, D3?
Thanks !Hi Veeravalli -
I found this blog helpful as it details out how to establish the relation. http://108obiee.blogspot.ca/2009/08/joining-two-fact-tables-with-different.html
I had a little difficulty in understanding what you wanted to say or implement. Now, after reading it 3-4 times I figured out that you mean 1. what the blog says 2. possibility of combining the facts as different source.
As a newbie it was difficult to understand it clearly.
Thanks ! -
Modelling 2 Fact Tables with Non-Conforming Dimension in OBIEE 11g
Hi all,
I have two fact tables (Fact 1 and Fact 2) and two dimension tables (Product and Rule). The Product dimension table is a conforming dimension and is used in both fact tables, but the Rule dimension is a non-conforming dimension which is used only one fact table. I'm using OBIEE 11g (11.1.1.6.0).
====
Fact 1
====
Sales ID | Product ID | Quantity | Sales Description | Sales Status
S001 | P001 | 100 | bla bla bla bla bla | N
S001 | P002 | 200 | bla bla bla bla bla | N
S002 | P001 | 200 | lab lab lab lab lab | Y
S002 | P003 | 250 | lab lab lab lab lab | Y
Notes for Fact 1:
- One Sales ID can have multiple Product IDs
- Sales Description and Sales Status are the same for one Sales ID (repeating Sales Description and Sales Status for the same Sales ID)
====
Fact 2
====
Sales ID | Product ID | Rule ID | Score
S001 | P001 | R001 | 2
S001 | P001 | R002 | 3
S001 | P002 | R003 | 1
S002 | P001 | R003 | 1
S002 | P003 | R002 | 2
S002 | P003 | R004 | 5
Notes for Fact 2:
- One combination of Sales ID and Product ID can have multiple Rule ID
I'm wondering how best to model these tables so that I can create this report (number of the dimension and fact tables created in the business model, level mapping, aggregation rule, etc)? Any suggestion/advice on how to achieve this?
Sales ID | Product ID | Quantity | Sales Description | Sales Status | Rule ID | Score
S001 | P001 | 100 | bla bla bla bla bla | N | R001 | 2
S001 | P001 | 100 | bla bla bla bla bla | N | R002 | 3
S001 | P002 | 200 | bla bla bla bla bla | N | R003 | 1
S002 | P001 | 200 | lab lab lab lab lab | Y | R003 | 1
S002 | P003 | 250 | lab lab lab lab lab | Y | R002 | 2
S002 | P003 | 250 | lab lab lab lab lab | Y | R004 | 5
Thank you very much!Hi Dhar, thanks for the suggestions.
I tested what you suggested, but the result is not as per my expectation mentioned above. Here's what I did:
1. In physical layer:
- I joined Fact 1 table with Product dimension table only
- I joined Fact 2 table with Product and Rule dimension tables
2. In business model layer:
- I created 3 logical tables: Fact, Product, and Rule
- The Product table contains the Product ID and Product Name from the Product dimension table in the physical layer
- I created the hierarchy (logical dimension) for Product with only ProductTotal level (as the grand total level) and ProductDetail level that contains Product ID and Product Name
- The Rule table contains the Rule ID and Rule Name from the Rule dimension table in the physical layer
- I created the hierarchy (logical dimension) for Rule with only RuleTotal level (as the grand total level) and RuleDetail level that contains Rule ID and Rule Name
- The Fact table contains 2 logical tables sources: Fact 1 (which logical level in the Content tab is mapped to ProductDetail and RuleTotal) and Fact 2 (which logical level in the Content tab is mapped to ProductDetail and RuleDetail)
- The Fact table contains Sales ID logical column (mapped to both Fact 1 and Fact 2 logical table sources)
- The Fact table also contains Sales Description and Sales Status logical columns (mapped to only Fact 1), which aggregation rule is the default to None
- The Fact table also contains Quantity logical column (mapped to only Fact 1), which aggregation rule is set to Sum
- The Fact table also contains Score logical column (mapped to only Fact 2), which aggregation rule is set to Sum
OBIEE returns the expected result when I retrieve the report:
Sales ID | Product ID | Quantity | Sales Description | Sales Status
However, OBIEE returns an error when I retrieve the reports:
Sales ID | Product ID | Quantity | Sales Description | Sales Status | Rule ID
or
Sales ID | Product ID | Quantity | Sales Description | Sales Status | Rule ID | Score
The error is:
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14020] None of the fact tables are compatible with the query request FACT.SALES_STATUS. (HY000)
And the Score column is blank when I retrieved this report:
Sales ID | Product ID | Quantity | Sales Description | Sales Status | Score
Any suggestion anyone? Please help. Thanks a lot!
Edited by: stewartlife on Nov 29, 2012 4:01 PM -
Mix source data with different granularity into the same fact table?
I have two transaction tables "Incident (157 columns)" and "Unit (70 Colums)". For every "Incident" that happens there could be one or more records in the "Unit" table.
As part of my data mart design, I have merged both the tables into a single Fact "Incident Fact (227 Columns)" and inserted the records from both the tables with a join condition between them [incident.IN_NUM = Unit.IN_NUM].
Is this correct, is my question? or am I mixing source data with different granularity in the same fact table. Appreciate your help.
Best Regards
BeesBees,
Are the measures from 'Incident' , repeated for a given incident where it has more than one record in the Unit table ? If so, then the sum(indicent.measure) will give an incorrect result, no ?
What requirement is there to physically merge the tables together outside of OBIEE? With OBIEE you could have one logical 'fact' table to present to report users, which sourced from seperate Incidents and Units tables and would stop the incorrect aggregations occuring. A common modelling piece in the same way would be Order Headers and Order Lines, quite common in OBIEE to have a logical 'Orders' fact which contained both Order header measures and Order line measures, this translates to your Incidents -> Units relationship.
To do what I've mentioned, is relatively straight forward, you need a 'Dim - Incident' with two levels, Incident and Unit, mapp the unique identifiers in as the level keys and then use these levels to set the content levels correctly in your 2 logical tables sources for logical 'Fact' , ie Incidents LTS at incident level, Units LTS as units level.
Hope this helps, let us know if you get stuck.
Cheers
Alastair -
How to create summation column with different measures of fact table
If I have a salary fact table with columns MONTHID | BASIC-SALARY | TRAVEL-ALLOWANCE
and in Deski, I drag all the three columns to form a horizontal table
then is it possible to create a summation column to show total salary?
I don;t want to create a variable because in that case the formula need to be changed everytime there is a new allowance.
regards,
binayakHello Binayak,
as you refer to Deski I recommend to post this query to the [BusinessObjects Desktop Intelligence|SAP BusinessObjects Desktop Intelligence; forum.
This forum is dedicated to topics related to the creation and design of Desktop Intelligence documents such as universe connectivity, prompts, charting, formatting, filter, and formulas.It is monitored by qualified technicians and you will get a faster response there.
Also, all Desktop Intelligence queries remain in one place and thus can be easily searched in one place.
Best regards,
Falk
Maybe you are looking for
-
How to create a "Explorer" like in java
i'm just wonderin if there's a way on how to create "Windows Explorer" like in Java wherein you can view all your directories with yellow folder icon and also you can view all your files and drives.... And when you double click the yellow folder icon
-
How do I install a JAD & associated JAR file on a ...
Hi all, I have a Nokia 6288 which I would like to install a signed application in the form of a signed JAD and accompanying JAR file. I need the JAD because it is a signed application, and I need the phone to recognise this because the application ac
-
Transferring movies to iPad mini
I have movies that I can watch perfectly in iTunes, but why can't I view them on my iPad mini? I have tried syncing them over wireless and Ive tried plugging the iPad into my macbook and syncing that way, but neither options seem to work. What am I
-
Hi sdn team, can i delete line items in sales order...i mean i was asked not to do so..... when i do so what kind of consequences will i have to look forward to? regards.
-
Buffered TDMS file still very large
Hello, I am trying to to stream to a TDMS file. I am writing approximately 10 channels of data at 20 Hz. I was creating a new file evey 5 mins or so and defragging the file once I was finished with it, which was giving me a reasonable size of file. I