Time Granularity
D/W/M/Q Axis Switching
Build
Overview
Features
Prompts
Troubleshooting
Key Features
Your line chart shows monthly revenue — a user wants to switch to weekly or daily. The wrapper-measure approach means parallel DAX for every metric. The field parameter approach is cleaner — it swaps the X-axis column directly — but requires a DATATABLE with NAMEOF references, new calendar columns, sort columns, a slicer, and undocumented visual.json patches. This skill builds the field parameter table, adds calendar columns, creates the slicer, and patches your charts with the correct fieldParameters block.
How it works
Type /time-granularity-field-parameter, choose your layout option, and the skill builds everything:
Adds necessary columns to your calendar table (week labels, month labels, sort columns — depends on selected option)
Creates a field parameter table (Hlp_TimeGranularity) with NAMEOF references to the calendar columns
Registers the table in model.tmdl
Creates a tile slicer for D/W/M/Q selection
Patches target chart visuals with the fieldParameters block
Option | X-Axis | Labels | Best for |
|---|---|---|---|
1. Year hierarchy | Year > Granularity | Short (Jan, Q1, W5) | Dashboards with year comparison |
2. Year in labels | Granularity only | Full (Jan 2025, Q1 2025) | Standalone charts with long time ranges |
3. Date columns | Date-type columns | Raw dates (1/1/2025) | Continuous axes without scroll bars |
What you get
Calendar columns — granularity-specific columns with sort support
Field parameter table — DATATABLE with NAMEOF references
Tile slicer — D/W/M/Q button slicer with default selection
Patched charts — fieldParameters block linking the slicer to the X-axis
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.

Clone Page
Build
Clone any report page with all visuals, bookmark navigators, interactions, and drillthrough bindings as a fully independent copy.

Convert to Trendline
Build
Add formatted data labels, markers, area shading, and a canvas tooltip to line chart visuals.

