Working with DateTime Dimension in SSAS
Using the DateTime Dimension as created in my previous post here come a description on how to use this as a dimension in SSAS.
As I prefilled the DateTime Dimension with a lot of data (Years 2008 to 2020) there is currently no relation to existing facts data. In the Data Source View I use a SQL View that has a sub query in it to exclude data from the DateTime Dimension and only dates with facts are visible to the end user.
Like Select from dim.DateTime where DateTimeId >= (select min(DateTimeId) from fact) and DateTimeId <= (select max(DateTimeId) from fact)
First the Dimension gets the following Attributes and Hierarchies:
The Attribute Relationships have to be like this:
After processing the dimension is browsable: