none
Handle start and stop date and time in same fact table

    Question

  • I have a fact table for "Treatment".  Each treatment has a start and stop date.  Is it as simple as placing a surrogate key from the date dimension in each of the start and stop fields in the fact table?  Seems simple but I'm guessing there are more things to consider than I am.

    Thanks kindly for any thoughts.

    Friday, March 14, 2014 6:29 PM

Answers

  • Yes It is. This is an example of role playing dimension. Here we will have two keys in fact called StartDatKey and StopDateKey each pointing to DateKey of date dimension using a foreign key constraint. And we will create relationships inside cube between fact and date dimension twice one each for start and end date values.

    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by 318Siam Friday, March 14, 2014 7:09 PM
    Friday, March 14, 2014 7:08 PM

All replies

  • Yes It is. This is an example of role playing dimension. Here we will have two keys in fact called StartDatKey and StopDateKey each pointing to DateKey of date dimension using a foreign key constraint. And we will create relationships inside cube between fact and date dimension twice one each for start and end date values.

    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by 318Siam Friday, March 14, 2014 7:09 PM
    Friday, March 14, 2014 7:08 PM
  • Yes, it is that simple.

    Friday, March 14, 2014 7:10 PM