Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

The dates in my facts are falling of the edge of my world

$
0
0


I've got a standard calendar that I use for all my projects.  The SK is an integer, format YYYYMMDD, there's a record for every day from 2009-01-01 to 2019-12-31, and it has a 1753-01-01 member for Unknown.  Very standard stuff indeed. 

I've got some data that is Snapshot in nature.  They're hospital cases.  They're very long-term hospital cases.  Some of them (quite validly)  fall of the edges of the Calendar dimension.   I might have start and end dates of 1950-06-25 and an end date of 1953-07-27.  Those I can deal with, by excluding from the data warehouse anything with an end date which is NOT NULL and is earlier than 2009-01-01.

But some are still open (i.e end date IS NULL) and the start date is in the past . . . way in the past.  Say 1971-08-06.  Some others have been closed in the last few years, but again, the start date is way in the past.   I need to include both kinds of data in my analyses.

So, my question is:  how best to model this Fact data where the dates have fallen off the ends of my (Calendar) world?

 It would be silly (I think) to create a giant calendar for the last hundred years so that all Start Dates could find their SK match.  That doesn't answer how best to deal with NULL end dates.  Obviously, I will have an CaseIsOpen boolean (set to one for all NULL end dates), so I can count that by aggregating it . . . but that doesn't really answer the overall 'best practices' question.  What do I do about my two (ostensible) role-playing dimensions?

Are you an SSAS Maestro?  Can you please help?

Cheers, Donna


Donna Kelly


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>