Advice needed: join fact to time dimension with between clause

Hi All,
I've got 1 dimension and two fact tables. The 1 dimension could serve as a time dimension.(not specifically marked as this is a time dimension)
My Tables look like this (simplified)
Dim1:
date_pk (unique identifier)
date
month
year
fact1:
iid_date (foreign key to date_pk)
fact1_amount
Fact2:
begin_date
end_date
fact2_amount
In the physical layer i have a complex join between fact 1 and dim1 (date_pk = idd_date) and a complex join between fact2 and dim1 (dim1.date between fact2.begin_date and fact2.end_date and dim1.date <= CURRENT_DATE). In the business model i have complex joins between fact1 and dim1 and a complex join between fact2 and dim1 without further specification.
What I would like to achieve in Answers is that I select a Year and a Month from dim1 and add fact1_amount and fact2_amount to the same report and that the report shows both amounts. I would like some advice on how to set this up. Further more how to add a drill from year to month to date and what should I do when I'm willing to add more facts joined to the same Dim1
Any Advice is greatly appreciated
Gilles

Hello MMA1709,
You're right, this setup works!
But...
When you add an hierarchy and mark it as a time dimension it doesn't work anymore. It gives the following error in the consistency checker:
[38086] Physical table Dim1 in the time dimenison table source Dim1 is part of a complex join condition
And that means you cannot use any timebased calculations (AGO and TODATE). When I just create an hierarchy and do not mark it as a time dimension the hierarchy works well.
Any suggestions?

Similar Messages

  • Modelling Time Dimension with Fact Table containing Start Date and End Date

    Hi Gurus,
    I have a time dimension with Year till Date. I have a fact table which consists of Start Date, End Date, Person ID, Department ID.
    How do i design Time dimension with fact table the below scenario
    In the dashboard i have start Month and End month as prompts.
    In the report i need to display Count(Person ID) > Start Date and < End Date along the trend.
    For instance, i have selected Jan-2009 as start date and Apr-2009 as End Date, then i need to display Count(Person ID) of Jan-2009, Feb2009, Mar-2009 andApr-2009.
    I Can not connect Time dimension with only Start Date or only with End Date to get the trend along the months.
    Please advice on the issue which i am having.

    Hi,
    Thanks for the response, Infact i tried using Complex join in physical layer. I have considered Time table joined with Fact table, and used >= and took and alias of the Time table and joined fact table using <=. When coming to BMM, i am not knowing how do i design this as if i merge the both the time dimensiona and its alias into single table, values will not be correct and if i make them as seperate columns. i can not show the trend as both are different columns.
    Can you please let know where i am going wrong.
    Thanks

  • Time dimension with Hourly base time periods

    Hi all
    I need to analyze data at Hour, Day, Month, and Year levels. The data in the fact and dimension tables are at the 'Hour' level with DATE datatype, such as:
    02-SEP-10 10:00:00 AM
    02-SEP-10 11:00:00 AM
    To use Time-Series type calculations, I understand that I have to create an OLAP dimension of type 'TIME' (and not 'USER') and map it to the populated relational time dimension table.
    1) Can I have the primary key for 'Hour' level as the actual base level value of datatype DATE (eg. 02-SEP-10 10:00:00 AM) ?
    2) For the END_DATE and TIME_SPAN attributes at the 'Hour' level, what should I use?
    The documentation is only available for minimum 'Day' level hierarchies, which allows setting END_DATE and TIME_SPAN to the actual 'Day' value and 1, respectively.
    3) For the END_DATE and TIME_SPAN attributes at the 'Month' level, do I need to supply the last-date-of-each-month and number-of-days-in-that-month, respectively?
    Please bear in mind that I am relatively new to Oracle OLAP. Any assistance will be appreciated.
    Cheers.

    Thank you Szilard and Adnan for the very prompt and informative responses.
    I managed to follow the advice on the oracleolap.blogspot link and created a time dimension with members at Hour level loaded into the dimension in character format: TO_CHAR(hour_id, 'DD-MON-YYYY HH24')
    The problem now is the maintenance (loading) of the dimension is taking an abnormally large amount of time (over 1 hour) as opposed to when the members were being loaded in DATE format (5 minutes). The mapping table only as 10,000 entries.
    Why is these such a big difference? Is it normal? Is there a way to speed up the maintenance time?
    FYI, I have not created any indexes on any of the attributes.
    My platform is:
    11.1.0.7.0 DB
    11.1.0.7.0B Client

  • Time Dimension with Hourly base level

    Hi all
    I need to analyze data at Hour, Day, Month, and Year levels. The data in the fact and dimension tables are at the 'Hour' level with DATE datatype, such as:
    02-SEP-10 10:00:00 AM
    02-SEP-10 11:00:00 AM
    To use Time-Series type calculations, I understand that I have to create an OLAP dimension of type 'TIME' (and not 'USER') and map it to the populated relational time dimension table. My questions are:
    1) Can I have the primary key for 'Hour' level as the actual base level value of datatype DATE (eg. 02-SEP-10 10:00:00 AM) ?
    2) For the END_DATE and TIME_SPAN attributes at the 'Hour' level, what should I use?
    The documentation is only available for minimum 'Day' level hierarchies, which allows setting END_DATE and TIME_SPAN to the actual 'Day' value and 1, respectively.
    3) For the END_DATE and TIME_SPAN attributes at the 'Month' level, do I need to supply the last-date-of-each-month and number-of-days-in-that-month, respectively?
    Please bear in mind that I am relatively new to Oracle OLAP. Any assistance will be appreciated.
    Cheers.

    Thank you Szilard and Adnan for the very prompt and informative responses.
    I managed to follow the advice on the oracleolap.blogspot link and created a time dimension with members at Hour level loaded into the dimension in character format: TO_CHAR(hour_id, 'DD-MON-YYYY HH24')
    The problem now is the maintenance (loading) of the dimension is taking an abnormally large amount of time (over 1 hour) as opposed to when the members were being loaded in DATE format (5 minutes). The mapping table only as 10,000 entries.
    Why is these such a big difference? Is it normal? Is there a way to speed up the maintenance time?
    FYI, I have not created any indexes on any of the attributes.
    My platform is:
    11.1.0.7.0 DB
    11.1.0.7.0B Client

  • How to create a working day/holiday attribute in Time Dimension with OWB ?

    Hello everybody,
    I am trying with no success to create a Time Dimension (with the wizard it would be easier...) with a working day or holiday attribute (0 or 1) to be able to calculate measures only on working time !!! I am totally sure it's possible, obviously, but I found nothing on forums... Could you help me ??
    I use OWB 11g, I need all fiscal year/quarter/month/week and all calendar year/quarter/month/week attributes so without any wizard it would be quite impossible... thank you for your help !
    NB: of course I know how to define if a day is a working one or not, but I currently can't add any columns in Time dim created with wizard...
    Francois
    Edited by: [email protected] on Jun 15, 2009 8:24 AM

    Hi,
    First of all, thanks everyone for your help.
    I did several tests this morning.
    First of all, i've tried with time_from = 000000 and time_to = 235959 (23:59:59 CET) and the activity has been created with Time From = 04:00:00 and Time To = 03:59:59
    Strange no ??
    I've also tried with 230000 for time from and time to but the activity has been created with Time From = 03:00:00 and Time to = 03:00:00
    I cannot understand the logic behind....
    Thanks,
    Johnny Baillargeaux

  • Samp App V207 - joins F10 to time dimensions

    Hi everybody,
    I just had a look at the BIEE Sample App V207 and noticed that the physical fact table 'F10 Billed Rev' is joined to 3 Time dimensions:
    'D01 Time Day Grain'
    'D02 Time Month Grain'
    'D03 Time Quarter Grain'
    What's the idea behind this - performance improvements when doing time series calculations?
    Thanks for your input
    Regards
    Andy

    Hi Andy,
    Here it is maintaining three different levels so it can be helpful for aggregation tables and maintaining multiple LTS in BMM layer. The main purpose is for performance tuning, the server hits any of this tables based on the time level used in analysis.
    For ex: If the analysis is based on month level then the server will hit Month level table.
    Please mark if it is helpful/correct.
    Revert me for any queries.
    thanks,
    Tinku

  • Outer join with BETWEEN clause

    Hi All,
    I have 2 tables (A and B) which i need to join. I need all records from table A and matching records from the table B. below is the structure.
    TABLE A (total rows = 10)
    ROW_WID
    GL_DATE
    LOCATION_CODE
    TABLE B (total = 7)
    ROW_WID
    START_DATE
    END_DATE
    LOCATION_CODE
    Initially, we were asked to join based on location_code. In the table B, some of the LOCATION_CODE are missing, which is present in table A.
    We wrote below query
    SELECT A.*, B.START_DATE, B.END_DATE
    FROM A, B
    WHERE A.LOCATION_CODE = B.LOCATION_CODE (+)
    This gives 10 records, where 3 records have START_DATE and END_DATE NULL. because of outer join
    It gave all records from the A table. It worked fine. Now i need to add one more condition where A.GL_DATE between B.START_DATE and B.END_DATE
    If i write this
    SELECT A.*, B.START_DATE, B.END_DATE
    FROM A, B
    WHERE A.LOCATION_CODE = B.LOCATION_CODE (+)
    AND A.GL_DATE BETWEEN B.START_DATE and B.END_DATE
    This gives me only 7 records. IS IT POSSIBLE TO ADD OUTER JOIN with BETWEEN clause.

    Hi All,
    I'm in a similar situation,
    I have a complex query, everything is working fine, except this part (I will simplify everything, removing other stuffs because I need help only on the following condition)
    SELECT *
    from transaction t, card c
    where c.card_id = t.card_id (+)
    and t.trn_date between to_date ('01/01/2012','dd/mm/yy') and ('01/01/2013,'dd/mm/yy')
    How could i OUTER JOIN the between condition?
    I tried with
    and t.trn_date between to_date ('01/01/2012','dd/mm/yy') (+) and ('01/01/2013','dd/mm/yy') (+)
    but returns a "missing expression" error.
    Surely I'm missing some stupid thing about it, could you help me on this? (probably because I'm talking about parameters and I cannot put the outer join on a value)
    How can I rewrite the condition in order to satisfy what I'm trying to accomplish?
    Thanks in Advance,
    Alex
    Edited by: 981667 on 14-gen-2013 4.23
    Edited by: 981667 on 14-gen-2013 4.24

  • I need to configure my Time Capsule with a Ruckus wireless...

    Hi people, i need your help to solve this problem...
    I need to configure my time capsule for first time with one Ruckus wireless...
    If you can...could you please give me the solution?
    Thank you all!

    Time Capsule is designed for ethernet connection.. it is not really good without it.
    There is a single option to join wireless network.. hidden and unused as it should be..
    On a windows version you will have to hold down the alt key i think when you click the options for wireless mode.. it will then offer join a wireless network.
    It is super slow.. and subject to easy corruption of files.. it will turn off all wireless AP and routing and ethernet functions.. good luck!!

  • Query With BETWEEN Clause Slows Down

    hi,
    I am experiencing slow down query by using BETWEEN clause. Is there any solution for it?

    Here is the difference if I use equal not between.
    SQL> select to_char(sysdate,'MM-DD-YYYY HH24:MI:SS') from dual;
    TO_CHAR(SYSDATE,'MM
    11-14-2005 15:44:03
    SQL> SELECT COUNT(*) /*+ USE_NL(al2), USE_NL(al3), USE_NL(al4),
    2 USE_NL(al5), USE_NL(al6) */
    3 FROM acct.TRANSACTION al1,
    4 acct.account_balance_history al2,
    5 acct.ACCOUNT al3,
    6 acct.journal al4,
    7 acct.TIME al5,
    8 acct.object_code al6
    9 WHERE ( al1.reference_num = al4.reference_num(+)
    10 AND al1.timekey = al5.timekey
    11 AND al5.timekey = al2.timekey
    12 AND al3.surrogate_acct_key = al2.surrogate_acct_key
    13 AND al3.surrogate_acct_key = al1.surrogate_acct_key
    14 AND al1.report_fy = al3.rpt_fy
    15 AND al6.object_code = al1.object_adj
    16 )
    17 AND ((al1.timekey = 20040701
    18 or al1.timekey = 20040801
    19 or al1.timekey = 20040901
    20 or al1.timekey = 20041001
    21 or al1.timekey = 20041101
    22 or al1.timekey = 20041201
    23 or al1.timekey = 20050101
    24 or al1.timekey = 20050201
    25 or al1.timekey = 20050301
    26 or al1.timekey = 20050401
    27 or al1.timekey = 20050501
    28 or al1.timekey = 20050601
    29 or al1.timekey = 20050701
    30 or al1.timekey = 20050801
    31 or al1.timekey = 20050901)
    32 AND al3.dept = '480');
    COUNT(*)/*+USE_NL(AL2),USE_NL(AL3),USE_NL(AL4),USE_NL(AL5),USE_NL(AL6)*/
    34245
    SQL> select to_char(sysdate,'MM-DD-YYYY HH24:MI:SS') from dual;
    TO_CHAR(SYSDATE,'MM
    11-14-2005 15:44:24

  • Need help for storing time along with the date

    Hi,
    I have one procedure as follows, In last_update_column of the table job_data having date and time.But after execution of this procedure only date is inserting into the job_master.
    If I queires the table job_master with to_char(Last_Update_Date, 'DD-MM-YYYY HH24:MI:SS') , then it is showing time as 12:00:00.
    I tried to insert date with to_char,to_date format but it is not working.
    Please provide me the solution.
    Thanks in advance.
    create or replace
    PROCEDURE         SP_LOAD_JOB
    IS
    CURSOR CUR_DATA  IS
            SELECT   PARENT_ITEM,
         `               CHILD_ITEM_ID,
                   LAST_UPDATE_DATE
      FROM job_data,
    BEGIN
      For Cursor_job In CUR_DATA
                 Loop
                 Exit When CUR_DATA%Notfound;           
        Insert Into job_master(parent_Code,
                                       child_code,
                                       last_update_date)
    values(
                             Cursor_job.PARENT_ITEM,
                             Cursor_job.CHILD_ITEM_ID, ,
                             Cursor_job.Assembly_Item_Id,
                              Cursor_Bom.LAST_UPDATE_DATE)
    commit;
    end loop;
    END;

    Hi,
    I don't believe you
    First to input time to job_master from job_data table first you have to store time in job_data.
    execute 
    select LAST_UPDATE_DATE from job_data
    and show result.
    Second remark : your procedure will not compile success Because
        Insert Into job_master(parent_Code,
                                       child_code,
                                       last_update_date)  ---3columns
       values(
                             Cursor_job.PARENT_ITEM,
                             Cursor_job.CHILD_ITEM_ID, ,
                             Cursor_job.Assembly_Item_Id,
                              Cursor_Bom.LAST_UPDATE_DATE) ----4columns
    Third remark : why to insert into table from other you wrote procedure???! you need only type insert stmt like this
        Insert Into job_master(parent_Code,
                                       child_code,
                                       last_update_date)
        select .... from  job_data
    Ramin Hashimzade

  • I need to setup our time capsule with an arris cable router

    We have an existing 1st Gen Time Capsule but have moved. We went from Verizon Fios to CableVision Optimum Online.
    The cable modem is an Arris TM822G plugged into the the WAN port of the TC. I can connect to the cable modem via ethernet and that works.
    The time capsule flashes yellow and can't get an IP address but, my MacBook Pro sees the SSID
    We use this for Time Machine backups and don't want to lose what we have.
    Any ideas?  Couldn't find any from CableVision.

    Do a factory reset of the TC.. this seems to be necessary to get it going again in a new setup, especially with cable.
    Also your TC is probably in bridge mode.. the reset will put it back to router mode.
    Does the cable modem have a battery backup or phone service? Sorry I don't know the exact model.. anyway you need to shut down the modem.. if it is battery backup, drop out the battery or unscrew the coax cable. It can sometimes take 15min or more for the system to reset. when you plug in another device it will take the public IP. So the first device that connects captures the IP.. that has been your computer.. now you have to get the TC to take it over.
    A reset of the TC btw will not harm data on the disk.
    Reset methods here.
    http://support.apple.com/kb/HT3728
    After full 15min.. (you can try one minute to start).. power up the modem.. wait 2min and then power up the TC.

  • Help/advice Needed! Paid for 2 years with no servi...

    I have been with BT for 2 years since we moved into our first home, paying approx £40 a month for phone line and broadband! When we initially signed up we were asked various questions to see what product would be best for us, we told them we wouldn't be using phone line as we use our mobiles and would only use the wifi for childrens iPad! We were told to download BT app and log into wifi using email and password which we have done for 2 years! The wifi has always been very slow Nd hit and miss but we live in middle of no where so thought it was our area! After 2 years we have decided to start using home phone for childrens school purposes! So we bought phone, plugged it in and no dialling tone! Called BT who sent out engineer within a week! When engineer arrived he asked where is our hub? My response being whats a hub? After explaining how we usually connect to wifi he explained that that's not our wifi and a hotspot! So basically been paying for over 2 years never used land line or Internet due no fault of our own! We were never told about a hub or received one? The engineer told me to call and complain so which I did over 3 weeks ago! The advisor says he would fill in a form and pass on to his manager, but sent is a hub out which is charged us for? The hub has came and I still can't get any internet after spending another 2 hours on phone doing various tests they can't get it working and are sending out another engineer and was told could possibly be charged £129 for! As you can imagine I am furious with? I still haven't heard back from anyone and have sent a complaints form in also! Can anyone give me any advice on where I stand as I'm not very good with technology? Thanks

    Hi Emmaburke87,
    Welcome to the community forum. I'll be able to take a look at the details of your complaint. Please can you send me in your details using the "Contact The Mods" link found in my profile.
    Thanks
    PaddyB
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Advice Needed: Installing APEX 4.2.1 with SSO 10g

    I am running in an environment here where it is mandatory that I run SSO 10g (the old verison 10.1.x.x OAS based). How do I go about enabling SSO in APEX 4.2.1? Can I use the same ssosdk902.zip I used with APEX 3.x.x or do I need a different one? There is no plans to go to upgrade off of our legacy 10g SSO or go to OAM based SSO. I would appreciate any information that can be offered.

    Hi David,
    yes, you can use the same SDK. You just have to take care to follow the same steps. It's easy to forget to re-create synonyms and do grants after an APEX upgrade.
    Regards,
    Christian

  • Advice needed on sharing/registering logic express with 2 users

    Me and my mate, have got into audio production, and i am wondering if we can BOTH register the same logic program.
    Is there a specific limit on how many users can be on one single program? Surely logic must allow you at least 2 users, say incase you have a mac at home, and one in a seperate studio.
    All replys will be greatly appreciated.
    Thanks in advance
    Dan
    amd athlon xp   Windows XP Pro  

    No Dan,
    I'm affraid you can't do that, it's highlly Illegal,
    You can't register one licence to two persons,
    You can install it on two of Your machines, (not your mate's one)
    for the reason that You can only use one at the time.
    Otherwise, it will be a paradise, everyone would find software mates
    and split the price and I would be on Pro instead of LE! :o)
    I believe you can have LE as an academic (if you are one or your mate) for a fraction of the price.
    Anyway, welcome to the forum, I wish that you have all the fun with LE and make nice music with it.
    Kindly Regards,
    Jorge

  • Handling Time Dimensions with Monthly and Weekly analysis

    I'm charged to build a cube that can handle both monthly and weekly analysis. They want to be view projections on a weekly grain, but looking back at history they want to be able to tie back to the general ledger at a monthly level.
    Is it overkill to load data down to the daily level in order to support multiple roll ups to the month and week? What is the best way to handle this kind of situation?

    Having the data come as two different formats (one for months, one for weeks) versus having it come in daily buckets and constructing the months/weeks within Essbase is a call I wouldn't make without understanding the needs first.
    Assuming there is no need for data at the daily level, I would weigh the selection based on performace. If the performance is not too outragious, taking the data in at a daily basis would make it easier to reconstruct later. If performance is an issue (or becomes an issue), I would still be tempted to load a daily cube at level 0, summarize the Months and Weeks, and then feed the main cube from there.
    So many ways to do this... and for every way there is a reason you might want to try something else. I'd start with the easy approach, and only go "grand" if you have to (meaning: load it daily, summarize in Essbase, and revisit the detail/summary cube split idea if the performance tanks out).

Maybe you are looking for

  • How can I send multiple subcon PPMs to APO since one PV must be in the PIR?

    We often have two or three production versions for a single subcontracting material. For example, PV 01-1 from now until June, then PV 02-1 from June until November. To create the PPM in APO via CFM1/CFM2 we must have one PV in the subcontracing PIR.

  • Error showing in the import statement

    Hi there........ I am working on mobile project of expense managemnt. in that code i started with following statements. import java.sql.*; i am using the CDC 1.0 toolkit. it shows the error that statement does not exist & errors for class. Is it nece

  • Imposible to reset

    Hi! First of all, im spanish and my english is not so good. I will try to explain me possible the best. The ipod of my girlfriend I remain itself blocked and is impossible to resume it or to restore it. We have tried it all. It remained with the on s

  • No Drag&Drop in Adobe Reader X to Excel or Word...

    With Adobe Reader 9.4.1 it was possible to copy text with drag&drop to Excel or Word. Now, after Update to Adobe Reader X there is no drag&drop possible!!!

  • Font size in CS 5.5

    I moved from CS 3 to CS 5.5 In the Property Inspector, I can no longer find the Style or Size box. How do I get those back. I use the Size box to change a font on the fly.      Thanks, CMA