Home Forums Data Warehousing Strategies and Ideas Beginner - Star schema - Date dimension lookup from Customer dimension RE: Beginner - Star schema - Date dimension lookup from Customer dimension

  • I think you are a little bit confused with the topic.

    You have to differentiate between dimension attributes and dimensions.

    If you want to analyze for instance, how many patients have visited a clinic the last 6 month, then your fact table will have a column with the count of visits by the dimensions clinics and patients.

    If you want to filter this analysis using the DOB of the patients, you just need a dimensional attribute in the patients dimension and then using your OLAP apply the correspondent filter.

    If you need to calculate every day the exact age of a patient, you can implement a function in the view that feeds the dimension and then process it daily.

    You can even discretize the patient dimension using buckets to categorized them in age ranges, i.e., under 25 year, from 25 to 35, older than 35, etc.

    If the DOB is so important in your analysis, another option is create a separated dimension DOB and then during the loading of your fact table lookup the correspondent Id in the date dimension and book every transaction with the correspondent DBOId.

    Hope that helps,

    Paul Hernández