Best way to combine multiple fact tables in single mart

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

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

Similar Messages

  • Is there a way to combine multiple pages into a single document?

    In the program "Pages," is there a way to combine multiple pages in a single document?

    Jean Louis Gassee, who used to be a senior Apple executive, wrote on Apple's bad approach to the latest iWork suite:
    https://discussions.apple.com/message/25209121#25209121
    Peter

  • Best way to connect two fact tables when no conformed dimension exists

    Can anyone please elaborate how would I connect two fact table without any conformed dimension. Let say FACTA, FACTB. FACTB is related to a dimension "StatusDim". I want to select the count of all FACTA item which are related to FACTB items with
    a particular status. I have found the following article but just wondering whether it is the best practise to connect two fact tables directly.
    http://bifuture.blogspot.com/2011/11/ssas-selecting-facts-with-reference.html
    Thank you

    Hi Ahsan,
    After read the blog you posted, I think it's a pretty good solution to create a view in the relational database or a named query in the Data Source View containing as the the columns in FACTA and FACTB. Then build a dimension from it, setting the "Null processing"
    property (you have to click the "plus" two times for the "Key Columns" property of the attribute in BIDS to access this property) to "UnknownMember". And then use this dimension for the many-to-many relationship. Dimensions from FactA can benefit of the reference
    relationship between FactA and FactB and therefore a powerful solution it is.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • How to combine multiple fact tables and dimensions in one worksheet?

    Hello Forum,
    I am encountering a reporting problem when trying to create a worksheet that uses more than one cube/fact table and common dimensions. I have used Oracle Warehouse Builder 10Gr2 to design and deploy a pretty simple ROLAP data mart. We are using Discoverer Plus for OLAP as our reporting tool. We have 5 dimension tables using a star schema and 3 fact tables, when I create the worksheet I bring in our sales measure from our sales item table and then Store_Name from my Stores Dimension and then day from my time dimension, everything looks good at the stage, we're just trying to get a sum of all sales for that store on that day. Then I bring in a measure from our advertising cost table and a join window pops up asking which join to use, if I choose either the Store or the Time dimension I get correct data for the first fact table (sales) and grossly incorrect data for the ad cost measure from the second fact table (advertsing costs)...... any help would be appreciated

    You have encountered one of the key limitations of Discoverer... which I complained about to the Discoverer product manager at OpenWorld in 2001....
    Anyhow, to get around this, you are going to have to deal with it either in the database, (views, materialized views, tables), or within the admin tool by creating a custom folder.
    Discoverer also calls this the "fan trap", but never really had a solution to the problem. [The solution only worked is you joined to one and only one dimension!]
    What you want (using Sales_Fact and Inventory_Fact as an example) is to join Sales to Time, Store, and Product, and save that result. Then join Inventory to Time, Store, and Product, save that result, then do a double outer join between the two intermediate temporary tables in order to calculate something useful like inventory turns by store and product line.
    This is also known a "multipass SQL", and is supported by some (but not many) other tools.
    So, to accomplish this with Discoverer, you'll either need to create a view, or table, or materialized view that has already put Sales and Inventory into a single (virtual?) fact table. Alternatively you can write the SQL for how to do this linkage (don't forget to handle missing data), and use the Discoverer admin tool to create a custom folder that uses your SQL.
    Hope this helps!

  • What is the best way to combine multiple projects into one?

    My guess would be to turn them into compound clips and then make the transfer that way, but is that the only way?

    You can merge Events from the file menu.
    Select the Events,  File > Merge Events
    You could also convert project timlines into CC timlines which would be saved in an Event.
    Open project timeline, select all, copy and then paste into a CC timeline.

  • Multiple fact tables using one measure

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

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

  • Joins with multiple fact tables

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

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

  • What is the best way to sync multiple collections of contacts among multiple users?

    (I originally submitted this question under the "Mac OS X Technologies" section, but got no response. I'm submitting a duplicate here because this is where all the smart folks are! My apologies that my question is only partially related to OS X Server . . . )
    What is the best way to sync multiple collections of contacts among multiple users on iOS and OS X?
    For example, suppose I have three collections of contacts: Bob's, Sally's, and Common. I want Bob to be able to access and sync Bob's contacts and Common contacts, and Sally to access and sync Sally's contacts and Common contacts. Bob and Sally never need to access or sync each other's contacts. Bob and Sally would both sync and share contacts in Common.
    How would I best implement this? It's my understanding I have three options for managing contacts across iOS and OS X: 1. iCloud accounts, 2. Install OS X server, or 3. Install and manage Darwin CardDAV directly. Which method would best support what I wish to do?
    I am a seasoned Unix geek well versed in the terminal, so I am prepared to get my hands dirty as much as necessary to achieve what I want. Also, it is sufficient if syncing takes place over WiFi on the local network, in fact, that is desirable versus syncing over the cloud.

    Thanks for your reply Nick101. I see my example was oversimplified. When I say "multiple groups of contacts over multiple users" I'm really referring to N groups of contacts over N users.
    So I need to add Fred, who can access and sync Bob's contacts, Sally's contacts, and Common contacts, as well as Fred's contacts. Can I do it with OS X server?
    You mention you keep your and your partner's contacts administered locally. What keeps you from administering them through OS X server as well?
    I am guessing this can all somehow be accomplished with multiple contact accounts, but I can't find any information on the web explicitly describing this.

  • Best Way to Aggregate Multiple Announcement Apps and Possibly External RSS Feed

    Hello,
    I have two separate announcement apps (one in sub-site A, and one is sub-site B). I am trying to create a webpart that will display content from both apps together.
    I have tried to setup a CSWP and have been able to set the query to pull in the data (Although it shows expired announcements, which I would need to eliminate). Now, I am trying to customize the display of the CSWP, including the property mapping values
    to display the announcement title (currently working with the URL as a link) and body (truncated like the announcement summary view if possible).
    How can I get the body from the announcement to display? The 'body' field isn't listed as an option in the drop down list of mapping values. Do I need to toggle an option on the separate announcement apps, create a column, map a field, or some combination?
    Also, I'd like to know if it is possible to add in an external RSS feed. Or, if there is a completely different way to approach and accomplish this, please let me know.
    Thank you

    Hi,
    To display the “Body” field of Announcements list properly in Content Search Web Part, you can take a look at this blog about how to customize the display template for a good
    start:
    http://social.technet.microsoft.com/Forums/en-US/bf0eb4de-445f-435a-8c88-1826bfb3aae5/best-way-to-aggregate-multiple-announcement-apps-and-possibly-external-rss-feed?forum=sharepointdevelopment
    If there are more complex needs in customization, the two links below would be helpful:
    http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/09/03/3588171.aspx
    http://blogs.technet.com/b/tothesharepoint/archive/2013/05/28/stage-11-upload-and-apply-display-templates-to-the-content-search-web-part.aspx
    Also, if you have several questions, it is recommended to post them in each single thread to make others in this forum easier to focus on one issue in one thread.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Best way to assign multiple users security, privileges and workbook shares.

    Is there another way to assign multiple users to a single workbook other than using the workbook management option. Something that can be done from the command line? How about assigning security and privileges from the command line?

    You could consider altering the appropriate EUL tables directly - I'm sure someone has the code for this - but requires database interaction (and might not be supported by Oracle, etc.).
    However, the concept or Oracle responsibilities (in Oracle Apps EUL) or Oracle roles (in Oracle database) is what's usually done. In fact, I don't like using users directly as if they go, etc. it's a pain.
    Better to use pre-defined groupings that you probably already have (ie: Apps responsibility such as: AP Inquiry). You set the privs / security there and it takes effect for all users logging in with that responsibility / role.
    Russ

  • Best way to achieve multiple paths with quizzes using Captivate 6?

    I’m looking for the best way to achieve multiple paths and quizzes using Captivate 6.
    Here is the scenario: The learner watches general slides 1 – 3 and then chooses between Path A, Path B, or both paths combined.  If they choose Path A then they watch the A portion only and take the A Quiz only. Same happens for Path B and for the two paths combined. The learner would only have to go one path to complete the course.
    What I’m finding is Captivate only has one Quiz results page (even if you create two separate quizzes, it merges them). I was trying to avoid having three separate projects for the same module to keep it simple. I see if I have three separate projects I could use the Multi-SCO Packager to merge them for use on my Moodle LMS. But wait, I don't have the elearning suite, so I don't have access to the Multi-SCO Packager...
    My question is: What is the best approach way to accomplish this goal? Any recommendations?
    Message was edited by: austingina

    Captivate 6 has Branch Aware quizzing.  Turn on that option in Quiz Settings and then your Quiz Results page should only show results for the branch your user visits.

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

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

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

  • Best way to deal with Mutating table exception with Row Level Triggers

    Hello,
    It seems to be that the best way to deal with Mutating Table exception(s) is to have to put all the trigger code in a package & use it in conjunction with a Statement level trigger .
    This sounds quite cumbersome to me . I wonder is there any alternative to dealing with Mutating table exceptions ?
    With Regards

    AskTom has a good article about this,
    http://asktom.oracle.com/tkyte/Mutate/index.html

  • Best way to outer join a table that is doing a sub query

    RDBMS : 11.1.0.7.0
    Hello,
    What is the best way to outer join a table that is doing a sub query? This is a common scenario in EBS for the date tracked tables.
    SELECT papf.full_name, fu.description
      FROM fnd_user fu
          ,per_all_people_f papf
    WHERE fu.user_id = 1772
       AND fu.employee_id = papf.person_id(+)
       AND papf.effective_start_date = (SELECT MAX( per1.effective_start_date )
                                          FROM per_all_people_f per1
                                         WHERE per1.person_id = papf.person_id)Output:
    No output produced because the outer join cannot be done on the sub queryIn this case I did a query in the FROM clause. Is this my best option?
    SELECT papf.full_name, fu.description
      FROM fnd_user fu
          ,(SELECT full_name, person_id
              FROM per_all_people_f papf
             WHERE papf.effective_start_date = (SELECT MAX( per1.effective_start_date )
                                                  FROM per_all_people_f per1
                                                 WHERE per1.person_id = papf.person_id)) papf
    WHERE fu.user_id = 1772
       AND fu.employee_id = papf.person_id(+)Output:
    FULL_NAME     DESCRIPTION
    {null}            John DoeThanks,
    --Johnnie                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    BrendanP wrote:
    ... See the adjacent thread for the other with Row_Number().Do you mean {message:id=10564772} ? Which threads are adjacent is always changing. Post a link.
    I think RANK suits the requirements better than ROW_NUMBER:
    WITH    all_matches     AS
         SELECT  papf.full_name
         ,      fu.description
         ,     RANK () OVER ( PARTITION BY  papf.person_id
                               ORDER BY          papf.effective_start_date     DESC
                        )           AS r_num
         FROM             fnd_user             fu
         LEFT OUTER JOIN      per_all_people_f  papf  ON  fu.employee_id  = papf.person_id
         WHERE   fu.user_id  = 1772
    SELECT     full_name
    ,     description
    FROM     all_matches
    WHERE     r_num     = 1
    Johnnie: I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    See the forum FAQ {message:id=9360002}

  • Can a measure map to multiple fact tables

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

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

Maybe you are looking for