# SmartVisuals Date Slicer for Power BI

> Power BI date slicer with YTD and MTD presets that keep rolling after publishing, fiscal years, ISO weeks, holidays for 21 countries and comparison periods.

- Page: https://www.smartvisuals.io/visuals/date-slicer
- Fields and settings: https://www.smartvisuals.io/visuals/date-slicer/settings
- Microsoft Marketplace: https://marketplace.microsoft.com/en-us/product/smartvisuals.smartvisuals-date-slicer?tab=overview
- Package: https://www.smartvisuals.io/downloads/smartvisuals-date-slicer-1.0.1.0.pbiviz
- Sample report (zipped .pbip): https://www.smartvisuals.io/samples/smartvisuals-date-slicer-sample-1.0.1.0.zip
- Price: Free tier for every viewer; premium $1.99 per user per month or $19 per user per year on Microsoft Marketplace, with a 30-day free trial. Premium works in edit mode without a licence; unlicensed viewers see the free tier, never a blocked visual.
- Certified by Microsoft: yes
- Version: 1.0.1.0
- GUID (visualType and publicCustomVisuals): `dateSlicer5B31A308CE89423F868B26BA14DFA05F`

## What is free

- **Four layouts in one slicer**: Calendar with 1 to 3 months, timeline from years down to days, compact bar with previous / next stepping and a presets list; Auto picks the layout that fits the space.
- **Presets that keep rolling**: Today and yesterday; this and last week, month, quarter and year; next week, month and quarter; half-years; week, month, quarter, half-year and year to date; last 7 / 30 / 90 / 365 days; last 12 months; and viewers' own "last or next N" of any unit.
- **Latest date with data**: Rolling presets can end on the latest date that has data instead of today, moved forward only when later data appears, never pulled back by other visuals.
- **Your calendar**: Fiscal years from any month, weeks starting Monday, Sunday or Saturday, ISO or simple week numbers, and fiscal-aware to-date presets.
- **Holidays and working days**: Public holidays for 21 countries computed offline, weekend shading and the working-day count of the selected range in the header.
- **Every way to pick**: Between, on or after, on or before and single day; typed dates in your report's format; an Apply button for heavy models; Reset to the default.
- **Native Power BI behaviour**: Bookmarks, sync slicers, date hierarchies, data density bars, four themes with their own personality, high contrast, full keyboard use and 20 languages.

## What premium adds

- **Comparison period**: Previous period, same period last year or 52 weeks back, shown in the header and written to a Comparison date field, so one line of DAX gives any measure its comparison.
- **Working days only**: Filter the report to working days, with weekends and the chosen country's public holidays left out.
- **Last N working days**: Presets such as the last 20 working days, rolling like every other preset.
- **Retail 4-4-5 calendars**: Retail years as 4-4-5, 4-5-4 or 5-4-4 with 52 and 53 week years, with presets and comparisons on retail periods.

## Fields

| Field | Internal name | Takes | Needed | What it is for |
| --- | --- | --- | --- | --- |
| Date | `date` | Column | Optional, up to 4 | The date column to filter. Use your date table's Date column for the best results; the auto date hierarchy works too. |
| Data density (optional) | `value` | Measure | Optional | A measure drawn as bars under the timeline and used for the 'latest date with data' anchor. Power BI syncs slicers across pages only when the slicer has a single field. |
| Comparison date (optional) | `compareDate` | Measure | Optional | A date column (usually a disconnected comparison calendar) that receives the comparison period. Premium. Disables sync slicers. |
| Tooltips | `tooltips` | Measure | Optional, up to 5 | Extra measures shown when hovering a day or period. |

## Format pane

Each card is a key under `visual.objects` in a PBIR visual.json; each setting is a property of it. Toggles take `true`/`false`, choices and text a value in single quotes (`'auto'`), numbers a `D` suffix (`12D`).

### Layout (`layout`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Layout | `mode` | `auto` (Auto (fit the space)), `calendar` (Calendar), `timeline` (Timeline), `compact` (Compact bar), `list` (Presets list) |
| Months shown | `months` | `auto` (Auto), `1`, `2`, `3` |
| Selection | `selectionType` | `range` (Between), `single` (Single day), `after` (On or after), `before` (On or before) |
| Timeline granularity | `granularity` | `day` (Day), `week` (Week), `month` (Month), `quarter` (Quarter), `half` (Half-year), `year` (Year) |
| Granularity switch | `showGranularity` | On / off |
| Typed date entry | `showInputs` | On / off |
| Previous / next arrows | `showStepper` | On / off |
| Apply button | `applyButton` | On / off |

### Presets (`presets`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show presets | `show` | On / off |
| Position | `position` | `auto` (Auto), `side` (Side), `top` (Top) |
| Today / Yesterday | `days` | On / off |
| This week / month / quarter / year | `thisPeriods` | On / off |
| Last week / month / quarter / year | `lastPeriods` | On / off |
| Next week / month / quarter | `nextPeriods` | On / off |
| Last 7 / 30 / 90 / 365 days | `rolling` | On / off |
| Last 12 months (rolling and full months) | `rolling12` | On / off |
| Week / month / quarter / year to date | `toDate` | On / off |
| Half-years (this, last, to date) | `halfYears` | On / off |
| Last 20 working days (premium) | `workingDays` | On / off |
| Let viewers choose Last / Next N | `viewerCustom` | On / off |
| Group headings | `showGroups` | On / off |
| Custom preset | `custom` | On / off |
| Custom: how many | `customCount` | Number |
| Custom: unit | `customUnit` | `day` (Days), `week` (Weeks), `month` (Months), `quarter` (Quarters), `half` (Half-years), `year` (Years) |
| Custom: include current | `customCurrent` | On / off |

### Default and reset (`selection`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Default selection | `defaultPreset` | `none` (None (all dates)), `today` (Today), `yesterday` (Yesterday), `thisWeek` (This week), `thisMonth` (This month), `thisQuarter` (This quarter), `thisYear` (This year), `lastWeek` (Last week), `lastMonth` (Last month), `lastQuarter` (Last quarter), `lastYear` (Last year), `last7` (Last 7 days), `last30` (Last 30 days), `last90` (Last 90 days), `last12m` (Last 12 months), `wtd` (Week to date), `mtd` (Month to date), `qtd` (Quarter to date), `hytd` (Half-year to date), `ytd` (Year to date), `last12cm` (Last 12 full months), `custom` (Custom preset) |
| Relative presets follow the calendar | `rolling` | On / off |
| Presets end on | `anchor` | `today` (Today), `yesterday` (Yesterday (complete days)), `latest` (Latest date with data) |
| Reset button | `resetButton` | On / off |
| Clear button | `clearButton` | On / off |

### Calendar (`calendar`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Week starts on | `weekStart` | `1` (Monday), `0` (Sunday), `6` (Saturday) |
| Week numbers | `weekNumbers` | `none` (Off), `iso` (ISO 8601), `simple` (Week of 1 January = 1) |
| Year type | `yearMode` | `calendar` (Calendar year), `fiscal` (Fiscal year), `retail` (Retail 4-4-5 year (premium)) |
| Fiscal year starts | `fiscalStart` | `0` (January), `1` (February), `2` (March), `3` (April), `4` (May), `5` (June), `6` (July), `7` (August), `8` (September), `9` (October), `10` (November), `11` (December) |
| Fiscal year name | `fiscalNaming` | `end` (By end year), `start` (By start year) |
| Retail pattern | `retailPattern` | `445` (4-4-5), `454` (4-5-4), `544` (5-4-4) |
| Retail year ends in | `retailEndMonth` | `0` (January), `1` (February), `2` (March), `3` (April), `4` (May), `5` (June), `6` (July), `7` (August), `8` (September), `9` (October), `10` (November), `11` (December) |
| Retail year ends on | `retailEndWeekday` | `0` (Sunday), `1` (Monday), `2` (Tuesday), `3` (Wednesday), `4` (Thursday), `5` (Friday), `6` (Saturday) |
| Retail year-end rule | `retailRule` | `nearest` (Weekday nearest month end), `last` (Last weekday of month) |
| Public holidays | `holidays` | `none` (None), `us` (United States (federal)), `uk` (United Kingdom (England & Wales)), `de` (Germany (national)), `fr` (France), `cz` (Czechia), `pl` (Poland), `at` (Austria), `nl` (Netherlands), `es` (Spain (national)), `it` (Italy), `ca` (Canada (federal)), `au` (Australia (national)), `sk` (Slovakia), `hu` (Hungary), `be` (Belgium), `ie` (Ireland), `pt` (Portugal), `se` (Sweden), `dk` (Denmark), `no` (Norway), `fi` (Finland) |
| Weekend | `weekend` | `satSun` (Saturday and Sunday), `friSat` (Friday and Saturday), `sun` (Sunday only), `none` (No weekend) |
| Shade weekends | `shadeWeekends` | On / off |

### Period intelligence (premium) (`intelligence`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Comparison period | `comparison` | `none` (Off), `previous` (Previous period), `sply` (Same period last year), `sply52` (52 weeks back (same weekdays)) |
| Show comparison in header | `showComparison` | On / off |
| Filter working days only | `workingDaysOnly` | On / off |

### Header (`header`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show header | `show` | On / off |
| Preset name | `showLabel` | On / off |
| Day count | `showDays` | On / off |
| Data through date | `showDataThrough` | On / off |
| Date format | `dateFormat` | `medium` (Medium (27 Sep 2026)), `short` (Short (27/09/2026)), `long` (Long (27 September 2026)), `iso` (ISO (2026-09-27)) |
| Text size | `fontSize` | Number |
| Text colour | `fontColor` | Colour |

### Theme and colours (`style`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Theme | `theme` | `smartvisuals` (SmartVisuals), `dark` (Dark), `clean` (Clean), `slate` (Slate) |
| Font | `fontFamily` | `theme` (Theme default), `inter` (Inter), `segoe` (Segoe UI), `arial` (Arial), `georgia` (Georgia) |
| Text size | `fontSize` | Number |
| Text colour | `fontColor` | Colour |
| Background | `background` | Colour |
| Headings (months, groups, captions) | `headingColor` | Colour |
| Secondary text (weekdays, week numbers) | `mutedColor` | Colour |
| Preset button colour | `chipColor` | Colour |
| Preset button text | `chipTextColor` | Colour |
| Lines and borders | `borderColor` | Colour |
| Dates without data | `noDataColor` | Colour |
| Selection colour | `accent` | Colour |
| Range colour | `rangeColor` | Colour |
| Today marker | `todayColor` | Colour |
| Holiday marker | `holidayColor` | Colour |
| Weekend shading | `weekendColor` | Colour |
| Data density bars | `densityColor` | Colour |
| Comparison colour | `compareColor` | Colour |
| Transparent background | `transparent` | On / off |

### Accessibility (`accessibility`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Focus outline colour | `focusColor` | Colour |
| Focus outline width (px) | `focusWidth` | Number |
| Minimum text size (px, 0 = off) | `minFontSize` | Number |
| Strike through dates without data | `noDataCue` | On / off |
