Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Help in design about employees cost

3 posters

Go down

Help in design about employees cost Empty Help in design about employees cost

Post  Rosanero4Ever Tue Feb 09, 2016 7:17 am

Hi all,

i need your help about the design of a dimensional model about the employeed cost.
I particular, i have the following dimensions:
- center of cost
- type of job contract (full time, part time, etc..)
- employee level
- list of employees

The first three dimensions have two fieds "From Date" and "To Date" which are useful to represent the interval of a single record.
So, I modeled this (see the image, please)
Help in design about employees cost Kimbal12

When I filter the fact table using the time dimension, I would like filter the center of cost, type of job contract and employee level dimensions using the same filter (where TimeDimension.Date between "FROM Date" and "TO Date")

How can I model this behavior without filtering each time also the other dimensions(center of cost, type of job contract and employee level )?
Many thanks in advance

Rosanero4Ever

Posts : 8
Join date : 2013-07-16

Back to top Go down

Help in design about employees cost Empty Re:Help in design about employees cost

Post  zoom Tue Feb 09, 2016 9:47 am

I cannot see the data model picture you uploaded. You have created type 2 dims. I think you are trying to select Fact rows for a specific day.
If that is the case, then you should get other Dim IDs in the fact table for that specific day if they exist. Instead of using your time dim, use other dim for example cost dim to find if there are any rows for that specific day. If you find cost dim rows then join to fact table to get the fact rows.

In a SCD type 2 data model, you have to specify a day or constraint a day on your dims to get your Fact rows back. So I do not understand what kind of behavior you are talking about.

zoom

Posts : 97
Join date : 2010-08-23
Location : Chicago

Back to top Go down

Help in design about employees cost Empty Re: Help in design about employees cost

Post  BoxesAndLines Tue Feb 09, 2016 1:05 pm

You don't need to. If you filter your fact rows for 1/1/2016, all the dimension FK's will point to the dimension row as it looked on 1/1/2016 (assuming type 2 scd). If your dimension is type 1, then obviously, your dimension will be current view.
BoxesAndLines
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

Back to top Go down

Help in design about employees cost Empty Re: Help in design about employees cost

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum