Year Range Toggle

CY / 2Y / 3Y Year Window Slicer

Build

year-range-toggle

Overview

Features

Prompts

Troubleshooting

Key Features

Your bar chart spans five years of data, but stakeholders usually care about only the current year or the last two. Hiding past years via a visual-level date filter is static — it breaks when the calendar rolls over. Building it manually means creating a disconnected parameter table, a VF measure with SELECTEDVALUE + ISBLANK guards, wiring the measure as a visual-level filter, a tile slicer with correct interaction rules, and — when the chart axis lives on the calendar table itself — an auto-created disconnected axis table and TREATAS wrapper measures. Getting any one of those pieces wrong produces an empty chart with no error. This skill builds all of it from a single prompt.

How it works

Type /year-range-toggle, specify the target chart(s) and which periods to include, and the skill handles everything:

  1. Asks which periods to include — CY, 2Y, 3Y, 4Y, or 5Y — before proceeding

  2. Detects the calendar table, year column, and measure table from TMDL automatically

  3. If the chart axis is on the calendar table, auto-creates a disconnected hlpTrends axis table with TREATAS wrapper measures — no prompt needed

  4. Creates a PrmYearRange disconnected parameter table with Label and Order columns

  5. Writes a visual-level filter (VF) measure with ISBLANK guard so all years show when no external year slicer is active

  6. Creates a tile slicer above the chart, sized and styled to match existing page slicers

  7. Applies the VF measure as a visual-level filter on the target chart

  8. Sets interaction rules so slicer tiles cross-filter only their paired chart

What you get

  • PrmYearRange{Suffix} table — disconnected DATATABLE with Label (CY, 2Y, …) and Order (0, 1, …) columns; one table per target chart when multiple visuals are provided

  • VF measure_{BaseMeasure} Year VF that returns 1 for bars within the selected window, 0 for bars outside; ISBLANK guard shows all years when no external year slicer is selected

  • Updated chart visual — VF measure wired as a visual-level filter; axis updated to the disconnected table when auto-created

  • TREATAS wrapper measures{BaseMeasure} Trended measures created when the axis table is auto-created from the calendar table

  • Tile slicer — positioned directly above the chart, right-aligned, styled to match the page; one slicer per target chart

  • Scoped interactions — slicer tiles filter only their paired chart; other page visuals are unaffected

Tool Information

Price

20 USD

Category

Build

Version

Version 2.1.1.2.13