Domain 2 β€” Module 2 of 7 29%
9 of 26 overall
Domain 2: Model the Data Free ⏱ ~11 min read

Date Tables & Table Properties

Create a proper date table for time intelligence, and configure table and column properties β€” data categories, sort by column, summarisation, and display folders.

Every model needs a date table

Simple explanation

Imagine a calendar on your wall. It doesn’t just show dates β€” it shows which day of the week, which month, which quarter, whether it’s a holiday. That context is what makes a calendar useful.

A date table in Power BI is your data’s calendar. Without it, you can’t do year-over-year comparisons, running totals, or β€œsame period last year” calculations. DAX time intelligence functions require a proper date table to work.

Creating a date table

There are three common approaches:

Date = 
ADDCOLUMNS(
    CALENDARAUTO(),
    "Year", YEAR([Date]),
    "Month", FORMAT([Date], "MMMM"),
    "MonthNumber", MONTH([Date]),
    "Quarter", "Q" & CEILING(MONTH([Date]) / 3, 1),
    "WeekDay", FORMAT([Date], "dddd"),
    "DayOfWeek", WEEKDAY([Date], 2)
)

CALENDARAUTO() scans all date columns in your model and creates a contiguous date range. Be aware that it may pick up irrelevant dates from other columns β€” if your model has a β€œContractEndDate” of 2099, the table will extend to 2099. Use CALENDAR() with explicit dates when you need precise control.

Option 2: DAX CALENDAR (explicit range)

Date = 
CALENDAR(DATE(2020, 1, 1), DATE(2026, 12, 31))

Use when you want to control the exact date range rather than auto-detecting from data.

Option 3: Power Query (M code)

Create a date table in Power Query using List.Dates(). Useful when you need complex fiscal year logic or custom columns that are easier in M than DAX.

Marking the date table

After creating it, you must mark it:

  1. Select the Date table in the model
  2. Table tools β†’ Mark as date table
  3. Select the Date column

This tells Power BI to use your custom date table instead of its auto-generated one β€” and enables full time intelligence support.

Exam tip: what makes a valid date table

The exam tests whether you know the requirements:

  • Must have a column with Date data type
  • Must have no gaps (every day between min and max must exist)
  • Must be marked as a date table

Common trap: a table with only month-end dates (Jan 31, Feb 28, Mar 31) is NOT valid because it has gaps between months.

Configuring table and column properties

Beyond dates, Power BI lets you configure properties on any table and column to improve the user experience.

Column properties

PropertyWhat It DoesExample
Data CategoryTells Power BI how to treat the column (URL, Image URL, Barcode, Geographic)Setting a column to β€œCity” enables automatic map visualisation
Sort By ColumnSorts one column by another column’s valuesSort β€œMonth Name” by β€œMonth Number” (so Jan comes before Feb, not after Apr)
Summarize BySets the default aggregationProductID should be β€œDon’t Summarize” (it’s a key, not a measure)
Display FolderGroups columns into folders in the Fields paneGroup Year, Quarter, Month into a β€œDate Attributes” folder
DescriptionAdds a tooltip when hovering over the field”Total revenue including tax”
Is HiddenHides the column from report authorsHide foreign key columns that aren’t useful for reporting

Sort By Column: the classic exam question

Riley at Coastal Fresh (πŸ›’) has a Month Name column: January, February, March… By default, Power BI sorts text alphabetically β€” so April comes first, not January.

Fix: Create a MonthNumber column (1-12) and set Sort By Column on Month Name to MonthNumber.

Nadia at Prism Agency (πŸ“Š) has the same issue with day names β€” Friday sorts before Monday. She creates a DayOfWeekNumber column and sorts DayName by it.

Deep dive: data categories for maps

Setting a column’s data category to a geographic type (Country, State, City, Postal Code, Latitude, Longitude) enables:

  • Automatic map visual suggestions
  • Better geocoding accuracy
  • Bing Maps integration

Dr. Ethan at Bayview Medical (πŸ₯) sets his hospital City column’s data category to β€œCity” so Power BI automatically places hospitals on map visuals.

Knowledge check

Question

What three requirements make a valid date table in Power BI?

Click or press Enter to reveal answer

Answer

1. Has a Date column with Date data type. 2. Contains contiguous dates (no gaps). 3. Is marked as a date table using Table tools β†’ Mark as date table.

Click to flip back

Question

What DAX function auto-detects your data's date range for a calendar table?

Click or press Enter to reveal answer

Answer

CALENDARAUTO() β€” it scans all date columns in your model and creates a contiguous date range covering min to max dates found.

Click to flip back

Question

How do you fix month names sorting alphabetically instead of chronologically?

Click or press Enter to reveal answer

Answer

Create a MonthNumber column (1-12), then set the Month Name column's 'Sort By Column' property to MonthNumber.

Click to flip back

Knowledge Check

Riley creates a date table using CALENDARAUTO() and adds Year, Month, and Quarter columns. Time intelligence DAX functions still don't work. What did she miss?

Knowledge Check

Nadia's report shows months sorted as: April, August, December, February... What property should she configure?

Next up: Columns vs Measures: When to Use Which β€” the most important decision in DAX.