Rolling Averages Kit

Moving Averages & Running Total via Calculation Group

DAX

DAX

rolling-averages-kit

Overview

Features

Prompts

Help

Key Features

Your line chart shows monthly revenue, but people want to see the trend smoothed over 3, 6, or 12 months next to the raw actuals. The usual fix is a separate DAX measure for every KPI and every window size — and suddenly you're maintaining dozens of near-identical measures.

A calculation group does it once for every measure in the model. Drop it on a slicer, pick "Rolling Avg 3M", and any measure on the chart smooths instantly — and if you already have the Time Intelligence group, these items merge straight into it so it's all one slicer.

The fiddly part is the start of a series: a 3-month average has nothing to average over in month one or two, and without an explicit guard it quietly divides by the wrong number. This skill writes the correct pattern, handles the merge, and produces valid TMDL in a single command — run it with /rolling-averages-kit.

How it works

Type /rolling-averages-kit, point it to your PBIP project, and the skill builds the calculation group:

  1. Scans the model to detect the date table, date column, any existing calculation groups, and calendar type

  2. Asks one question: does your date table extend to Dec 31 of the max year, or does it stop where your data stops? (The scan infers the answer and pre-selects the recommended option)

  3. If one calculation group exists, merges the 5 new items into it; if none exists, creates a new group; if multiple exist, asks which group to target

  4. Generates 5 calculation items with the correct anchor mode based on your calendar type

  5. Writes valid TMDL and patches the model definition if a new group is created

What you get

  • Actual — pass-through, returns the selected measure unmodified

  • Rolling Avg 3M — 3-month moving average; returns blank for the first 2 months of the series (insufficient history)

  • Rolling Avg 6M — 6-month moving average; returns blank for the first 5 months of the series

  • Rolling Avg 12M — 12-month moving average; returns blank for the first 11 months of the series

  • Running Total — cumulative from the first visible date in context, respects page filters and slicers

Tool Information

Skill

39 USD

Bundle (All skills)

129 USD

Category

DAX

Version

Version 2.2.2.2

or log in if you already have an account