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.

Date range
Columns

Always included: Date, Year, Quarter, Month Number, Month Name.

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.

DateYearQuarterMonth NumberMonth NameMonth ShortYear Month SortMonth YearYear QuarterDay of MonthDay of YearDay of Week NumberDay NameDay ShortIs 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

  1. Select the Date table, then Table tools → Mark as date table and pick the Date column.
  2. Relate Date[Date] to your fact table's date column (one-to-many, single direction).
  3. Set Sort by column so these don't sort alphabetically:
    • Month Name by Month Number
    • Month Short by Month Number
    • Month Year by Year Month Sort
    • Day Name by Day of Week Number
    • Day Short by Day of Week Number
  4. 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.