Date Slicer fields and settings
Every field well and every setting in the format pane of version 1.0.1.0, read from the package you download. The internal names in grey are what a PBIR file or a report-authoring agent uses. Which features need a licence is on the Date Slicer page; every setting works in edit mode with or without one.
4 fields · 8 cards · 75 settings Markdown for AI assistantscatalog.json
Fields
| Field | Takes | Needed | What it is for |
|---|---|---|---|
Datedate | 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. |
Tooltipstooltips | Measure | Optional · up to 5 | Extra measures shown when hovering a day or period. |
Layoutlayout
| Setting | Type and options |
|---|---|
Layoutmode |
|
Months shownmonths |
|
SelectionselectionType |
|
Timeline granularitygranularity |
|
Granularity switchshowGranularity | On / off |
Typed date entryshowInputs | On / off |
Previous / next arrowsshowStepper | On / off |
Apply buttonapplyButton | On / off |
Presetspresets
| Setting | Type and options |
|---|---|
Show presetsshow | On / off |
Positionposition |
|
Today / Yesterdaydays | On / off |
This week / month / quarter / yearthisPeriods | On / off |
Last week / month / quarter / yearlastPeriods | On / off |
Next week / month / quarternextPeriods | On / off |
Last 7 / 30 / 90 / 365 daysrolling | On / off |
Last 12 months (rolling and full months)rolling12 | On / off |
Week / month / quarter / year to datetoDate | On / off |
Half-years (this, last, to date)halfYears | On / off |
Last 20 working days (premium)workingDays | On / off |
Let viewers choose Last / Next NviewerCustom | On / off |
Group headingsshowGroups | On / off |
Custom presetcustom | On / off |
Custom: how manycustomCount | Number |
Custom: unitcustomUnit |
|
Custom: include currentcustomCurrent | On / off |
Default and resetselection
| Setting | Type and options |
|---|---|
Default selectiondefaultPreset |
|
Relative presets follow the calendarrolling | On / off |
Presets end onanchor |
|
Reset buttonresetButton | On / off |
Clear buttonclearButton | On / off |
Calendarcalendar
| Setting | Type and options |
|---|---|
Week starts onweekStart |
|
Week numbersweekNumbers |
|
Year typeyearMode |
|
Fiscal year startsfiscalStart |
|
Fiscal year namefiscalNaming |
|
Retail patternretailPattern |
|
Retail year ends inretailEndMonth |
|
Retail year ends onretailEndWeekday |
|
Retail year-end ruleretailRule |
|
Public holidaysholidays |
|
Weekendweekend |
|
Shade weekendsshadeWeekends | On / off |
Period intelligence (premium)intelligence
| Setting | Type and options |
|---|---|
Comparison periodcomparison |
|
Show comparison in headershowComparison | On / off |
Filter working days onlyworkingDaysOnly | On / off |
Headerheader
| Setting | Type and options |
|---|---|
Show headershow | On / off |
Preset nameshowLabel | On / off |
Day countshowDays | On / off |
Data through dateshowDataThrough | On / off |
Date formatdateFormat |
|
Text sizefontSize | Number |
Text colourfontColor | Colour |
Theme and coloursstyle
| Setting | Type and options |
|---|---|
Themetheme |
|
FontfontFamily |
|
Text sizefontSize | Number |
Text colourfontColor | Colour |
Backgroundbackground | Colour |
Headings (months, groups, captions)headingColor | Colour |
Secondary text (weekdays, week numbers)mutedColor | Colour |
Preset button colourchipColor | Colour |
Preset button textchipTextColor | Colour |
Lines and bordersborderColor | Colour |
Dates without datanoDataColor | Colour |
Selection colouraccent | Colour |
Range colourrangeColor | Colour |
Today markertodayColor | Colour |
Holiday markerholidayColor | Colour |
Weekend shadingweekendColor | Colour |
Data density barsdensityColor | Colour |
Comparison colourcompareColor | Colour |
Transparent backgroundtransparent | On / off |
Accessibilityaccessibility
| Setting | Type and options |
|---|---|
Focus outline colourfocusColor | Colour |
Focus outline width (px)focusWidth | Number |
Minimum text size (px, 0 = off)minFontSize | Number |
Strike through dates without datanoDataCue | On / off |
Setting a value in PBIR
In a visual.json, a setting goes under visual.objects, by card and internal name. Toggles take true or false, choices and text a value in single quotes ('auto'), numbers a D suffix (12D).
"visual": {
"visualType": "dateSlicer5B31A308CE89423F868B26BA14DFA05F",
"objects": {
"layout": [{
"properties": {
"showGranularity": { "expr": { "Literal": { "Value": "true" } } }
}
}]
}
}