Created
January 18, 2017 07:18
-
-
Save jrotello/e9dffc0dfae312ae63f93935cc7ae856 to your computer and use it in GitHub Desktop.
DAX Calendar Table Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Calendar = ADDCOLUMNS ( | |
CALENDAR (DATE(2016,1,1), DATE(2018,12,31)), | |
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ), | |
"Year", YEAR ( [Date] ), | |
"MonthNo", FORMAT ( [Date], "MM" ), | |
"YearMonthNo", FORMAT ( [Date], "YYYY/MM" ), | |
"YearMonth", FORMAT ( [Date], "YYYY/mmm" ), | |
"MonthShort", FORMAT ( [Date], "mmm" ), | |
"MonthLong", FORMAT ( [Date], "mmmm" ), | |
"WeekDayNo", WEEKDAY ( [Date] ), | |
"WeekDay", FORMAT ( [Date], "dddd" ), | |
"WeekDayShort", FORMAT ( [Date], "ddd" ), | |
"Quarter", "Q" & FORMAT ( [Date], "Q" ), | |
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment