I am going to provide the scripts/codes of the date dimension knows as DimDate to you in 3 main format. (Last updated and tested on 2016-10-21)
- SQL Script (Tested in SQL 2016) (Click here to download)
- DAX (Tested in Power BI) (Download as Power BI File Or Text format)
- M Language (Tested in Power BI)
- You don't have to use all of them, a good example is the week fields.
- In some scenarios I have seen that having extra field like [MonthEndDateFlag] will speed up my process or I get a better query plan from SQL server, so you will have to test test test.
- some visualization tools have limitation and because of that you will need more fields.
a good example is the limitation of pivot tables in excel.
Try using fields from date dimension in the "Column", "Rows" and "Filters", for example can you extract dates from the past ten years only Q1 & Q4 and Jan & Dec month only.
Assuming that you have your Dim in SSAS and you are using Excel, so you will need the [Year], [Quarter] and the [Month] fields and you will need 2 hierarchies in SSAS...
1- Lustrum => Year => Quarter => Month => Day
2- Quarter=> Month - A well designed dimension is a dimension with hierarchies.