Date Table Generator
Pick a range, a fiscal calendar, and the columns you need. Get a date table you can paste straight into Power BI as a DAX calculated table or a Power Query M query, with a preview of the rows it produces.
In Power BI Desktop: Modeling → New table, then paste. 4,018 rows, 15 columns.
Date =
VAR StartDate = DATE(2020, 1, 1)
VAR EndDate = DATE(2030, 12, 31)
RETURN
ADDCOLUMNS(
CALENDAR(StartDate, EndDate),
"Year", YEAR([Date]),
"Quarter", "Q" & QUARTER([Date]),
"Month Number", MONTH([Date]),
"Month Name", FORMAT([Date], "MMMM"),
"Month Short", FORMAT([Date], "MMM"),
"Year Month Sort", YEAR([Date]) * 100 + MONTH([Date]),
"Month Year", FORMAT([Date], "MMM YYYY"),
"Year Quarter", YEAR([Date]) & " Q" & QUARTER([Date]),
"Day of Month", DAY([Date]),
"Day of Year", DATEDIFF(DATE(YEAR([Date]), 1, 1), [Date], DAY) + 1,
"Day of Week Number", WEEKDAY([Date], 2),
"Day Name", FORMAT([Date], "DDDD"),
"Day Short", FORMAT([Date], "DDD"),
"Is Weekend", WEEKDAY([Date], 2) > 5
)Preview
Month and day names follow your model's locale; they're shown in English here.
| Date | Year | Quarter | Month Number | Month Name | Month Short | Year Month Sort | Month Year | Year Quarter | Day of Month | Day of Year | Day of Week Number | Day Name | Day Short | Is Weekend |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2020-01-01 | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
| 2020-01-02 | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
| 2020-01-03 | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
| 2020-01-04 | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
| 2020-01-05 | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
| 2020-01-06 | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
| 2020-01-07 | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
After you paste it
- Select the
Datetable, then Table tools → Mark as date table and pick theDatecolumn. - Relate
Date[Date]to your fact table's date column (one-to-many, single direction). - Set Sort by column so these don't sort alphabetically:
Month NamebyMonth NumberMonth ShortbyMonth NumberMonth YearbyYear Month SortDay NamebyDay of Week NumberDay ShortbyDay of Week Number
- Build the measures on top of it with the Time Intelligence Generator: YTD, prior year, growth, and rolling windows.
Free, with no sign-in and no request limit. Everything runs in your browser, and nothing you type is sent anywhere.
DAX or Power Query? Both produce the same table. Use Power Query if you want the date table to live with the rest of your data preparation or to reuse it across files with a dataflow. Use DAX if you'd rather keep it in the model, or if you're building it from a fact table that only exists after load.
New to date tables? Start with Date Tables, then see CALENDAR() vs CALENDARAUTO() for why this generator never uses CALENDARAUTO(), and Time Intelligence for the measures that depend on it.