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!
Randall

hi in the capacity fact table remove the level set for the calendar dim and see.

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

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

  • 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

  • Joining two fact tables with different dimensions into single logical table

    Hi Gurus,
    I try to accomplish in Oracle Business Intelligence 11.1.1.3.0:
    F1 (D1, D2 and D3)
    F2 (D1 and D2 and D4)
    And we want to build a report F1 F2 D1 D2 D3 D4 to have data for:
    F1 that match only for D1-D2-D3
    and data for
    F2 that match only D1-D2-D4
    all that in one row, so D3 and D4 are not common dimensions.
    I can only do:
    F3 (D1, D2)
    F4 (D1, D2 and D4)
    And report
    F3 F4 D1,D2,D4 (all that in one row, and only D4 is not a common dimension)
    Here is the very good example how to accomplish the scenario 1
    http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.html
    But looks like it does not work in 11.1.1.3.0
    I get
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 14025] No fact table exists at the requested level of detail: [,,Clients,,Day,ROI,,,,EW_Names,,,,,,,,,,,,,,,,,]. (HY000)
    I am sure I set up everything correctly as advised in the blog but it works with only one not a common dimension
    Is it a bug in 11.1.1.3.0 or something?
    Thanks,
    Kate

    Thanks for all your replies.
    Actually, I've tried the solutions you guys mentioned. Generally speaking, the result should be displayed. However, my scenario is a little bit tricky.
    table Y's figures are not the aggregation of table X for D dimension. Instead, table Y's figures include not only D dimension total, but also others (others do not mean A, B, C dimension). For example, table Y stores all food's figure, while table X stores only drink's figure. D dimension is only about drink's detail. In my scenario, other foods' figure is not provided.
    So, even if I set D dimension to all/total for table X, table X's result is still not the same as table Y.
    Indeed, table Y does not have a column key to join to D dimension's key. So, if I select D dimension and table Y's measures at the same time in BI Answer, result returns no data. Hence, I can't compare table X and table Y's results with selection of D dimension.
    Is there any solution to solve this problem?
    Edited by: TomChan on Jun 3, 2009 9:36 AM

  • Two Fact tables 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

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

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

    Create 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

  • Mapping the Fact table to different levels of a dimension

    Hi,
    I have a fact table which stores the data for 4 levels of the dimensions. The aggregation method was taken care by PL/SQL and the fact table will have the data for all the 4 levels. When im trying to map all the levels to a column in the fact table using the OEM, it is generating the F KEY constraints referncing the columns mapped for the various levels of the dimension.
    The problem is that im using a denormalised table for maintaing the values of the dimension. So the columns mapped for the levels(Except for the lowest) can't have the unique key defined on it. The cube is not getting created because of the error in creating the F KEY.
    Can u please suggest how to map this fact table.
    Thnks,
    Manohar Vanama

    I am not exactly clear on your schema but I believe you are trying to map tables which are not strict star or snowflake. This means that you cannot use CWM1 (and OEM), unless you change the structure of the tables. You might be able to map the tables with CWM2. The document below will assist you:
    Oracle9i OLAP User's Guide
    Chapter 4. Designing Your Database for OLAP
    Chapter 5. Creating OLAP Catalog Metadata

  • 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

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

  • Two FACT Tables, Some Common and Non-Common Dimensions

    Hello all, a question i am sure you have faced in the past but still wanted to get your feedback.
    I have a few FACT tables and some dimensions that are shared (common dimensions). Rest of the dimensions are related to one or the other FACT tables.
    What is the best way to present a view where users can pull information from both the FACT tables?
    I am successful in pulling the shared (common) dimensions across BOTH FACT tables having the same grain but this view breaks down when i pull information from one Dimension that has not much to do with the other FACT.
    What is the best way to present this? Should this be broken in three subject areas?
    Subject Area 1 --> Some Dims --> FACT Table A
    Subject Area 2 --> Some Dims --> FACT Table B
    AND
    Subject Area 3 --> ***Only Common Dims*** --> FACT Table A & FACT Table B?
    Your feedback is always appreciated.
    Regards,
    Edited by: user10679130 on Oct 12, 2009 3:27 PM

    Please check the forum first for similar threads/questions.
    Joining two fact tables with different dimensions into single logical table
    http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.html
    This solution keeps both fact tables in the same subject area in the single logical fact table, with common and not-common dimensions.
    Regards
    Goran
    http://108obiee.blogspot.com

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

    Bees,
    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

  • Logical fact table with fragmented data sources with different dimensions

    Hello.
    I have a logical fact table with four logical table sources. Three of the LTS's share the same dimensions, but the fourth LTS has one dimension (called Dim_A) less. In the physical layer the dimension Dim_A is joined to the first three physical fact tables, but not to the fourth fact table (since it doesn't have that dimensionality). In the BMM layer the logical fact table is joines to the logical dimansion Dim_A.
    When I run an analysis on this RPD the measures from the logical fact is aggregated correctly (union of all four table sources) as long as I doesn't include Dim_A, but as soon as I include dimension Dim_A I get the error message:
    +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: 14052] Internal Error: Logical column Dim_A.Column_X has no physical sources that can be joined to the physical fact table source [Logical table sources (Priority=0): Fact_B.Fact_Y]. (HY000)+
    I would like a solution where the analysis returns correctly aggregated measures also for the LTS with the "missing" dimension, but with a dimension value NULL for this LTS. Or something like this.
    Is there a way to set this up in the RPD.
    Thanks,
    Henning Eriksen

    The SQL could look something like this.
    SELECT dim_a.col_1, fact_a.measure_1
    FROM db.dim_a
    JOIN
    db.fact_a
    ON fact_a.col_2 = dim_a.col_2
    WHERE fact_a.date = '28-nov-2012'
    UNION ALL
    SELECT dim_a.col_1, SUM (fact_b.measure_1)
    FROM db.dim_a
    JOIN
    db.fact_b
    ON fact_b.col_2 = dim_a.col_2
    WHERE fact_b.date = '28-nov-2012'
    UNION ALL
    SELECT dim_a.col_1, SUM (fact_c.measure_1)
    FROM db.dim_a
    JOIN
    db.fact_c
    ON fact_c.col_2 = dim_a.col_2
    WHERE fact_c.date = '28-nov-2012'
    UNION ALL
    SELECT NULL, SUM (fact_d.measure_1)
    FROM    db.fact_d
    WHERE fact_d.date = '28-nov-2012'
    I would appreciate if you could give me some hints for the RPD.
    Thanks,
    Henning

  • Fact table with 2 time keys, measures showing together in the same report

    Hello,
    I am using OBI EE and I have the following scenario: a fact table hold information about enquiries. An enquiry may or may not generate an appointment. So in my fact table I have two date columns: enquiry date and appointment booked date (not the date of the appointment itself, but when it was actually booked).
    This raises a couple of questions. First question is: I can only have one logical FK to the Times table, how to create two LFKs for those 2 dates? Should I create a logical copy of the Times table in the BMM, along with another time dimension?
    Second question is how to display both pieces of data in the same report. For instance, in a summary report per month I want to see the number of enquiries made and appointments booked in each month. Most likely they will be different numbers and refer to different rows in the database. What is the best way to model this in the BMM?
    For instance, in October there were 10 enquiries, 8 of them were converted into appointments along with 3 enquires made in September. So, the report should show for October: number of enquires: 10, number of appointments: 11 (8 from October + 3 from September)
    Sorry if this is a basic question but I couldn't find around any examples of this scenario.
    Thanks,
    Luis

    Genius, that works perfectly, thanks!
    Just one issue that I noticed... I have other dimensions on that fact table, one of them is "channel". Channel is linked to a column in the original fact table, as is Number of Enquiries.
    If I include Channel in a report that shows Number of Enquiries and Number of Appointments, the Number of Appointments column only shows zeros, while the Number of Enquiries column still shows the correct numbers:
    Month    Channel   Enquiries   Appointments
    Jan 09   Email      100           0
             Phone      120           0
    Feb 09   Email       87           0
    ...Then I figured out that I needed to add a PFK for all dimensions to the aliased fact table, not only for the times dimension.
    Thanks again
    Luis

Maybe you are looking for

  • Applet that records sound

    Hi all.. I am developing an applet that records sound and stores it in a WAV file... The applet is signed and loads in the browser well but it does not give the output, i.e. the WAV file in the specified directory. Can you please have a look at my co

  • Upload of data into SAP R/3 System

    The falt file data is in the form of segment types (HD,PF,TX,OP) and we have to upload it to SAP R/3 System by using the Function modules. How i have to proceed? Please ping to my question.

  • Loading masterdata and transaction data from same flat file

    hi all, how can i load master data and transaction data from the same flatfile at a time.

  • What is the best Graphic Card Option for me?

    I have a first generation Quad Core Mac Pro with a Radeon X1900XT with dual DVI Connections for my two older Apple 24" LCD Displays. I want the best card to run Adobe CS5 and support dual DVI for my 2 monitors. I was told maybe the ATI 4870 or 5770.

  • Adobe PDF pack cannot download

    I ordered and received acceptacne but not a confirmation email for  Adobe PDF pack, so cannot download PDFs now.