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

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?

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

  • 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

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

  • 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

  • Select count from large fact tables with bitmap indexes on them

    Hi..
    I have several large fact tables with bitmap indexes on them, and when I do a select count from these tables, I get a different result than when I do a select count, column one from the table, group by column one. I don't have any null values in these columns. Is there a patch or a one-off that can rectify this.
    Thx

    You may have corruption in the index if the queries ...
    Select /*+ full(t) */ count(*) from my_table t
    ... and ...
    Select /*+ index_combine(t my_index) */ count(*) from my_table t;
    ... give different results.
    Look at metalink for patches, and in the meantime drop-and-recreate the indexes or make them unusable then rebuild them.

  • Load fact table with null dimension keys

    Dear All,
    We have OWB 10g R2 and ROLAP star schema. In our source system some rows don’t have all attributes populated with values (null value), and this empty attributes are dimension (business) keys in star schema. Is it possible to load fact table with such rows (some dimension keys are null) in the OWB mappings? We use cube operator in mappings.
    Thanks And Regards
    Miran

    The dimension should have a row indicating UNKNOWN, this will have a business key outside of the normal range e.g. -999999.
    In the mapping the missing business keys can then be NVL'd to -999999.
    Cheers
    Si

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

  • Performance between two partitionned tables with different structure

    Hi,
    I would like if there is a difference between two partitionned tables with different structure in term of performance (access, query, insertions, updates ).
    I explain myself in detail :
    I have a table that stores one value every 10 minutes in a day (so we have 144 values (24*6) in the whole day), with the corresponding id.
    Here is the structure :
    | Table T1 |
    + id PK |
    + date PK |
    + sample1 |
    + sample2 |
    + ... |
    + sample144 |
    The table is partionned on the column date, with a partionned every months. The primary key is based on the columns (id, date).
    There is an additionnal index on the column (id) (is it useful ?).
    I would like to know if it is better to have a table with just (id, date, value) , so for one row in the first table we'll have 144 rows in the future? table. The partition will already be on the columns (id, date) with the index associated.
    What are the gains or loss in performance with this new structure ( access, DMLs , storage ) ?
    I discuss with the Java developers and they say it is simpler to manage in their code.
    Oracle version : Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Thanks & Regards
    From France
    Oliver
    Edited by: 998239 on 5 avr. 2013 01:59

    I mean storage in tablespaces and datafiles on disk.
    Can you justify please and give me concrete arguments why the two structures are equivalent ( except inserting data in T(id, date,value))
    because i have to make a report.i didnt say any thing like
    two structures are equivalent ( except inserting data in T(id, date,value)i said
    About structure : TABLE1(id, date, value) is better than TABLE1(id, date, sample1, .... sample144)because
    1) oracle has restriction for numbers of column. Ok you can have 144 columns now but for future if you must have more than 1000 columns , what will you do?
    2) Restrictions on Table Compression (Table compression is not supported for tables with more than 255 columns.)
    3) store same type values on diffrent columns is bad practise
    http://docs.oracle.com/cd/B28359_01/server.111/b28318/schema.htm#i4383
    i remember i seen Toms article about this but now i cant find it sorry ((( if i found i will post here

Maybe you are looking for

  • How do I combine selections from various photos into a single picture?

    I can't figure out how to open several pictures at once and then select sections from them and put the selections into one complete photo.  Can someone tell me how to do this?

  • Exporting InDesign CS4 file to Dreamweaver

    I am in the process of trying to figure out the best way to get my organizations print newsletter onto our website to view as html. I have a good knowledge of Dreamweaver but I am struggling on this one. We create & send our newsletter to print as an

  • Import format and scripts

    Hi, I have been testing an import script in a location but it kept showing me an import error message. Now I had only slightly modified a script from another location which i wrote a couple weeks ago so I was pretty sure I was working in the right di

  • Why does safari pick a minimized instance to open a link from e-mail in a new tab?

    Often when I open an URL from an e-mail message (Mail.app) it unminimizes a minimized Safari window to open the link in a new tab, while there are unminimized Safari windows available. This gets very annoying; those windows weren't minimized for noth

  • 10.5.3 problem with Aperture 2.1

    I recently spent the $200 to buy Aperture and have been enjoying it. Until, last night I updated Leopard to 10.5.3 Last night I read about problems other people were having with RAW photos appearing black upon editing after upgrading, and NOW the sam