Time Intelligence Kit

23 Patterns

DAX

Featured Image

Overview

Features

Prompts

Troubleshooting

Key Features

The classic approach to time intelligence creates YTD_Sales, YTD_Cost, YTD_Profit, MTD_Sales, MTD_Cost… — N measures × time variants = a maintenance nightmare that grows with every new measure you add. The SQLBI-recommended alternative is a Calculation Group: one SELECTEDMEASURE() pattern that wraps every explicit measure at query time. One group covers all 23 items. Add a new measure tomorrow and it inherits all 23 variants instantly. But building it correctly in TMDL means knowing compatibility level requirements, tab-only indentation, the formatStringDefinition syntax, discourageImplicitMeasures registration, the ref table patch, and the canonical format Power BI Desktop expects — or it fails to load. This skill generates the complete TMDL and patches your model in one command.

How it works

Type /time-intelligence-calc-group, point it to your model, and the skill builds everything:

  1. Scans your model to detect the date table and column (dataCategory: Time marker, then common name fallbacks: Date, Dates, Calendar, DimDate)

  2. Generates Time Intelligence.tmdl with 23 calculation items in canonical Power BI Desktop format

  3. Patches model.tmdl with three required changes: adds discourageImplicitMeasures, registers ref table 'Time Intelligence', and sets __PBI_TimeIntelligenceEnabled = 1

What you get

23 calculation items across 7 groups — pass-through, period-to-date, prior-year equivalents, YoY comparisons, MAT rolling, short rolling periods, MoM, and QoQ

  • Correct format strings — YoY %, MAT YoY %, MoM %, and QoQ % formatted as 0.00%; all other items inherit the measure's own format string

  • model.tmdl patched — three required properties added automatically, safe for models that already have some patches

The 23 items

Group

Items

Pass-through

No Filter

Period-to-date

YTD, QTD, MTD, Full Year

Prior year

Prior Year, PY YTD, PY QTD, PY MTD

Year-over-year

YoY Delta, YoY %

Moving annual

MAT, PY MAT, MAT YoY Delta, MAT YoY %

Rolling periods

R3M, R6M

Month-over-month

Prior Month, MoM Delta, MoM %

Quarter-over-quarter

Prior Quarter, QoQ Delta, QoQ %



Tool Information

Price

20 USD

Category

DAX

Version