Skip to content

Classic time intelligence

These examples intentionally use classic date-column time intelligence, not the newer calendar-based feature set. Use the marked, continuous DimDate and an active relationship to Sales[OrderDate]. Do not silently substitute an auto date/time hierarchy or a calendar tagged for another API.

Year-to-date revenue

Revenue YTD =
TOTALYTD ( [Revenue], DimDate[Date] )

YTD accumulates dates from the start of the current calendar year through the current date context. This dataset has no fiscal-calendar requirement. Changing to a fiscal year needs an explicit calendar/business definition, not merely a different display label.

Previous-year comparison

Revenue PY =
CALCULATE ( [Revenue], SAMEPERIODLASTYEAR ( DimDate[Date] ) )

The measure evaluates Revenue under the shifted date context. A missing prior period is not automatically zero. The guide's date table contains no 2024 dates, so the 2025 baseline has no prior-year value.

Revenue YoY % =
VAR PreviousRevenue = [Revenue PY]
RETURN
    DIVIDE ( [Revenue] - PreviousRevenue, PreviousRevenue )

Verify known periods

Run the time query. It shows only months with order-date revenue; a YTD-only visual can legitimately show later months with a carried cumulative value even where current-month revenue is blank.

Period Revenue Prior-year Revenue YTD YoY
2025-01 1100 BLANK 1100 BLANK
2025-02 2300 BLANK 3400 BLANK
2026-01 2400 1100 2400 118.18%
2026-02 3700 2300 6100 60.87%

These values assume the shown month, all products, and all regions. Total 2026 revenue compared with 2025 is about 79.41% growth; it is not the average of the two monthly growth rates.

Exercise: select North and explain which numbers change while the date definition stays the same. Then remove the region filter before comparing against this unrestricted table.

If values repeat incorrectly, inspect relationships and which date field the visual actually uses. If the engine reports invalid dates, inspect uniqueness, blanks, continuity, date type, and the marked date column. Date-shift semantics have edge cases around partial periods and leap years; test them against your actual calendar before adapting the example.

References: TOTALYTD, SAMEPERIODLASTYEAR, and time intelligence options.