Last N months

Dynamic Rolling Period Slicer

Build

Build

last-n-months

Overview

Features

Prompts

Help

Key Features

Your line or bar chart shows the full history, but you'd rather let readers zoom into a recent window they set themselves. The obvious tools let you down: a fixed date filter goes stale the moment the calendar ticks over, and Power BI's built-in relative date filter stops behaving once there's a year slicer on the page. And there's a subtle trap — when someone picks 2024 and a 13-month window, they should see December 2023 through December 2024, not just 2024. Getting the slider, the chart axis, and the year slicer to agree on that takes a lot of trial and error to build by hand.

This skill builds the whole thing in one go and drops a slider on the page that readers can drag themselves — run it with /last-n-months.

How it works

Type /last-n-months, point it at your chart, and it asks two quick questions before building everything:

  1. Looks at your model — finds your calendar table, its date columns, your fact tables, and anything compatible that's already on the page

  2. Shows you what it found — the calendar shape, the measures it picked up, and the tables it can anchor to

  3. Asks two things — the slider range (1–15 months by default, starting at 12) and which table the window should count back from

  4. Builds it — the supporting tables and measures, a slider on the page framed by "Last" and "months" labels, and the chart rewired to follow the window

  5. Saves it to your project — open in Power BI Desktop to see it working

What you get

  • A slider on the page — framed by "Last" and "months" labels, with the starting window you chose

  • A chart that follows the slider — drag it and the chart redraws to that many recent months

  • A reliable window end date — one consistent point the window counts back from, matched to your calendar

  • Correct bars every time — each month shows its true value even when a year slicer is also in play

  • The plumbing behind it — the small helper tables and measures that make the window work, added for you

Tool Information

Skill

39 USD

Bundle (All skills)

129 USD

Category

Build

Version

Version 2.2.2.2

or log in if you already have an account