Meagan Longoria shows how to create a date dimension using only DAX:
The fiscal calendar assumes calendar months with the fiscal calendar shifted by some number of months. It also assumes that the fiscal year is ahead of the calendar year. That is, fiscal year 2017 starts in the first day of some month in 2016. In my example script, the fiscal year starts in October. If you have some 4-4-5, 4-5-4, or other calendar, the fiscal calendar calculations in this script won’t help you.
To add this date dimension to your SSAS Tabular project:
-
Right click on the Model.bim file in the Solution Explorer and choose View Code.
-
If you have at least one table in the model already, locate the end of the definition of the previous table, inside the table array. Add a comma after the end curly brace for the previous table.
-
Paste the JSON/TMSL from my Gist.
-
Save and close the file.
-
Right click on Model.Bim and choose View Designer.
Click through for the script and additional explanation.