CY / PY Toggle
Current Year / Previous Year Comparison
Overview
Features
Prompts
Help
Key Features
A chart showing 2024 almost always invites the next question — how does that compare to 2023? Building that toggle by hand is a chore: you need a little parameter table for the two buttons, a year-shifting version of every measure on the chart, a title that updates with the selection, a button slicer styled to match the page, and interaction rules so the new buttons don't disturb anything else — all without upsetting the year slicer you already have. It's the better part of an hour, done right.
This skill builds the whole thing in one go, and it keeps step with your year slicer automatically — pick any year and PY always shows the one before it — run it with /cy-py-toggle.
How it works
Type /cy-py-toggle, point it at your chart, and it does the rest:
Looks at your model — finds your calendar table, your year slicer, the measures on the chart, and how the chart is styled
Confirms two things — which measures to shift, and which folder the new measures should live in
Builds the comparison — a year-shifted version of each measure that shows this year or last year depending on the button
Adds a self-updating title — reads like "Revenue Current Year 2024" or "Revenue Previous Year 2023" as you toggle
Points the chart at it — swaps the chart over to the new measures and wires up the title
Drops in the buttons — a compact CY / PY slicer in the chart's top-right corner, styled to match your page, starting on CY
Keeps it tidy — the buttons only affect this one chart, and nothing else on the page can change them
Follows bookmarks — if the chart shows and hides with a bookmark, the buttons are grouped with it so they come and go together
What you get
A CY / PY button — a compact two-button slicer in the chart's top-right corner, matching your page style, starting on CY
A chart that follows the button — CY shows the selected year, PY shows the year before
A self-updating title — "Revenue Current Year 2024" or "Revenue Previous Year 2023", switching with the button
Year-shifted measures — one per measure on the chart, so the comparison is correct for whatever's plotted
Clean interactions — the buttons drive only this chart and stay out of everyone else's way
Bookmark grouping — set up for you when the chart is shown and hidden by a bookmark
Explore more in this category

Absolute / Percentage Toggle
Build
Add a two-button tile slicer to any chart that switches between absolute values and a percentage variant, with a dynamic format string and auto-derived chart title.

Active Filters Card Visual
Build
Generate a card visual that dynamically displays all currently active slicer and filter selections.

Apply rounded
Build
Convert standard column or bar charts to a lollipop "rounded column" style using Power BI's native error bar feature

Clone Page
Build
Clone any report page with all visuals and bookmarks
Tool Information
Skill
39 USD
Bundle (All skills)
129 USD
Category
Build
Version
Version 3.2.2.2
or log in if you already have an account

