# SmartVisuals Countdown & Days-Since for Power BI

> SmartVisuals Countdown & Days-Since: a free Power BI countdown timer and days-since-last-incident counter. Ticks live between refreshes, real time zones, working days and holidays, a deadline board. No licence, no watermark.

- Page: https://www.smartvisuals.io/visuals/countdown
- Fields and settings: https://www.smartvisuals.io/visuals/countdown/settings
- Microsoft Marketplace: https://marketplace.microsoft.com/en-us/product/smartvisuals.smartvisuals-countdown?tab=overview
- Package: https://www.smartvisuals.io/downloads/smartvisuals-countdown-1.0.1.0.pbiviz
- Sample report (zipped .pbip): https://www.smartvisuals.io/samples/smartvisuals-countdown-sample-1.0.1.0.zip
- Price: Free, every feature, no licence.
- Certified by Microsoft: no
- Version: 1.0.1.0
- GUID (visualType and publicCustomVisuals): `countdownTimer1F116F5EB2844AFDA3D921F4012C0E5C`

## What is free

- **Counts both ways**: Count down to a deadline, or up from the last event with the current streak, the best streak and the date the best was set. Count in calendar days, working days or shifts.
- **Ticks live between refreshes**: Runs on the viewer's clock from a monotonic base, so it neither freezes between refreshes nor drifts after a laptop sleeps. An optional Reference time measure corrects a device clock that is running behind.
- **Real time zones**: Pin the deadline to the viewer's zone, UTC, a fixed offset or a named zone such as Europe/Prague, with a stated, tested daylight-saving policy and a choice of which midnight ends the day.
- **Working days, holidays and shifts**: Working weekdays, a bound column of non-working dates and a business-hours window that may cross midnight for a night shift.
- **Recurring deadlines**: Daily, weekly, monthly, quarterly or yearly, plus end of every month, end of every quarter and fiscal-year end, with month-length clamping. After zero, keep counting, stop, show a message or roll to the next occurrence.
- **Deadline board, timeline and pace**: Every milestone as a row sorted by urgency with a state chip and cross-filtering, the same dates on a timeline with a now marker, and Actual against Goal with the rate still needed and the projected finish.
- **Six layouts, four themes**: Plain, blocks, flip clock, ring, bar and one line, in the SmartVisuals, Dark, Clean and Slate themes, with a format-pane control for everything drawn on screen. Fit The Number To The Visual (Text card, on by default) sizes the number to the space it has, inside the ring too; Hide Seconds Beyond in the Units card drops the seconds while the count is longer than the hours you set (48 by default); and the deadline board shows as many rows as fit the visual's height, up to Maximum Rows, with a line such as + 6 more for the rest (Say How Many Rows Are Hidden).
- **Honest about its input**: Rows that are not dates are skipped and reported with a warning, never guessed at. An unknown time-zone name is flagged too. No network calls, no locked features.

## Fields

| Field | Internal name | Takes | Needed | What it is for |
| --- | --- | --- | --- | --- |
| Deadline | `target` | Column or measure | Optional | The date to count down to. Leave empty and set a date in the format pane instead. |
| Event dates | `events` | Column | Optional | Dates of the events to count up FROM - incidents, resets, releases. Bind the whole column and the visual also reports the best streak on record. |
| Start | `start` | Column or measure | Optional | Start of the window, for the progress layout. |
| Non-working dates | `holidays` | Column | Optional | Dates that are never working days - public holidays, shutdown weeks. Use a column from the same table as your dates. |
| Caption | `label` | Column | Optional | Text shown above the number. |
| Reference time | `reference` | Measure | Optional | Optional model clock, e.g. UTCNOW(). Used only to correct a viewer device clock that is running behind. |
| Actual | `actual` | Measure | Optional | How much is done so far. With Goal and a window, the visual reports the run rate you still need. |
| Goal | `goal` | Measure | Optional | The number Actual has to reach by the deadline. |
| Tooltips | `tooltips` | Measure | Optional | Extra fields to show in the tooltip. |

## 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`).

### Countdown (`countdown`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Mode | `mode` | `countdown` (Countdown (to a deadline)), `countup` (Days since (count up)), `progress` (Progress (start to end)), `auto` (Auto (from the fields)), `board` (Deadline board (many rows)), `track` (Milestone track (timeline)), `pace` (Pace (are we on track)) |
| Date (When No Field Is Bound) | `staticTarget` | Text |
| When The Column Has Many Dates | `targetPick` | `nextFuture` (Next one still ahead), `latest` (Latest date), `earliest` (Earliest date), `lastPast` (Most recent past date) |
| After It Reaches Zero | `afterZero` | `countup` (Keep counting (overdue by)), `stop` (Stop at zero), `message` (Show a message), `roll` (Roll to the next occurrence) |
| Message At Zero | `zeroText` | Text |
| Show Tenths Of A Second | `showTenths` | On / off |

### Days Since (`streak`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show Current Streak | `showCurrent` | On / off |
| Show Best Streak | `showBest` | On / off |
| Show When The Best Was Set | `showBestDate` | On / off |
| Count In | `countIn` | `calendar` (Calendar days), `working` (Working days), `shift` (Shifts) |
| Best-Streak Label | `bestLabelText` | Text |
| Current-Streak Label | `currentLabelText` | Text |

### Deadline Board (`board`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Sort Rows By | `sortBy` | `urgency` (Soonest first), `urgencyDesc` (Latest first), `data` (Data order), `label` (Caption A to Z) |
| Overdue Rows First | `overdueFirst` | On / off |
| Maximum Rows | `maxRows` | Number |
| Row Height | `rowHeight` | Number |
| Show Row Dividers | `showDivider` | On / off |
| Say How Many Rows Are Hidden | `showMoreFooter` | On / off |
| Show State Chip On Each Row | `showRowState` | On / off |
| Show The Date On Each Row | `showRowDate` | On / off |

### Milestone Track (`track`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show The Now Marker | `showNowMarker` | On / off |
| Show Grid Lines | `showGrid` | On / off |
| Labels | `labelPlacement` | `alternate` (Alternating), `above` (Above), `below` (Below), `none` (None) |
| Marker Size | `dotSize` | Number |
| Show The Date Axis | `showAxisLabels` | On / off |

### Pace (`pace`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show The Required Rate | `showRequiredRate` | On / off |
| Spread Over | `rateBasis` | `calendar` (Calendar days), `working` (Working days) |
| On-Track Band (% Of Goal) | `onTrackBand` | Number |
| Show The Projected Finish | `showProjection` | On / off |
| Show The Gap To Plan | `showPlanDelta` | On / off |
| Ahead Color (Empty = Theme) | `aheadColor` | Colour |
| Behind Color (Empty = Theme) | `behindColor` | Colour |

### Time Zone (`timezone`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Deadline Time Zone | `zoneKind` | `viewer` (Report viewer's local zone), `utc` (UTC), `offset` (Fixed offset), `iana` (Named zone) |
| Fixed Offset (e.g. +02:00) | `fixedOffset` | Text |
| Named Zone (e.g. Europe/Prague) | `ianaZone` | Text |
| A Day Ends At | `dayRollover` | `local` (Local midnight), `utc` (UTC midnight) |
| Show The Zone On The Visual | `showZoneChip` | On / off |

### Units (`units`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Largest Unit | `largestUnit` | `d` (Days), `h` (Hours), `m` (Minutes), `s` (Seconds) |
| Smallest Unit | `smallestUnit` | `d` (Days), `h` (Hours), `m` (Minutes), `s` (Seconds) |
| Hide Seconds Beyond (Hours, 0 = Never) | `autoCollapseSeconds` | Number |
| Day Counting | `breakdownMode` | `auto` (Auto (calendar days)), `calendar` (Calendar days), `duration` (Exact 24-hour days) |
| Leading Zeros | `leadingZeros` | `auto` (Auto), `always` (Always), `never` (Never) |
| Language Of The Words | `unitLanguage` | `en` (English), `report` (Follow the report locale) |
| Unit Labels | `unitLabelStyle` | `long` (Full words), `short` (Short (d h m s)), `none` (None) |
| Unit Label Position | `unitLabelPosition` | `below` (Below the number), `inline` (Beside the number) |
| Word For Days | `labelDay` | Text |
| Word For Hours | `labelHour` | Text |
| Word For Minutes | `labelMinute` | Text |
| Word For Seconds | `labelSecond` | Text |

### Working Time (`workingTime`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Count Working Time | `enabled` | On / off |
| Sunday | `day0` | On / off |
| Monday | `day1` | On / off |
| Tuesday | `day2` | On / off |
| Wednesday | `day3` | On / off |
| Thursday | `day4` | On / off |
| Friday | `day5` | On / off |
| Saturday | `day6` | On / off |
| Limit To Business Hours | `businessHours` | On / off |
| Business Hours Start (HH:MM) | `businessStart` | Text |
| Business Hours End (HH:MM) | `businessEnd` | Text |
| Non-Working Dates (One Per Line) | `holidayDates` | Text |
| Show The Working-Day Readout | `showWorkingReadout` | On / off |

### Recurrence (`recurrence`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Repeats | `unit` | `none` (Does not repeat), `day` (Daily), `week` (Weekly), `month` (Monthly), `quarter` (Quarterly), `year` (Yearly), `monthEnd` (End of every month), `quarterEnd` (End of every quarter), `fiscalYearEnd` (End of the fiscal year) |
| Every N | `every` | Number |
| On | `weekday` | `0` (Sunday), `1` (Monday), `2` (Tuesday), `3` (Wednesday), `4` (Thursday), `5` (Friday), `6` (Saturday) |
| Day Of The Month | `dayOfMonth` | Number |
| Month (Yearly) | `month` | Number |
| At (HH:MM) | `timeOfDay` | Text |
| Fiscal Year Starts In Month | `fiscalYearStartMonth` | Number |

### Style (`style`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Layout | `style` | `plain` (Plain), `blocks` (Blocks), `flip` (Flip clock), `ring` (Ring), `bar` (Bar), `inline` (One line) |
| Separator | `separator` | `auto` (Auto (theme)), `colon` (Colon :), `dot` (Dot ·), `slash` (Slash /), `none` (None) |
| Blink The Separator | `separatorBlink` | On / off |
| Ring Thickness | `ringThickness` | Number |
| Bar Height | `barHeight` | Number |
| Animation | `animation` | `auto` (Auto (theme)), `none` (None), `fade` (Fade), `flip` (Flip) |

### Text (`text`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Font | `fontFamily` | `inter` (Inter), `segoe` (Segoe UI), `arial` (Arial), `georgia` (Georgia), `mono` (Monospace) |
| Fit The Number To The Visual | `autoFit` | On / off |
| Number Size | `valueSize` | Number |
| Unit Label Size | `unitSize` | Number |
| Caption Size | `captionSize` | Number |
| Alignment | `align` | `center` (Center), `left` (Left), `right` (Right) |
| Number Color (Empty = Theme) | `valueColor` | Colour |
| Unit Label Color (Empty = Theme) | `unitColor` | Colour |
| Caption Color (Empty = Theme) | `captionColor` | Colour |

### States (`states`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show State Icon | `showIcon` | On / off |
| Show State Label | `showStateLabel` | On / off |
| Warning When Within | `warningValue` | Number |
| Warning Unit | `warningUnit` | `d` (Days), `h` (Hours), `m` (Minutes) |
| Critical When Within | `criticalValue` | Number |
| Critical Unit | `criticalUnit` | `d` (Days), `h` (Hours), `m` (Minutes) |
| Normal Color (Empty = Theme) | `normalColor` | Colour |
| Warning Color (Empty = Theme) | `warningColor` | Colour |
| Critical Color (Empty = Theme) | `criticalColor` | Colour |
| Overdue Color (Empty = Theme) | `overdueColor` | Colour |
| Warning Label | `warningText` | Text |
| Critical Label | `criticalText` | Text |
| Overdue Label | `overdueText` | Text |

### Caption (`caption`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show Caption | `showLabel` | On / off |
| Caption Text (Empty = From Data) | `labelText` | Text |
| Show The Target Date | `showTarget` | On / off |
| Target Date Format | `targetFormat` | `dateTime` (Date and time), `date` (Date only), `full` (Long date) |
| Show "As Of" Stamp In Exports | `showAsOf` | On / off |

### Theme (`theme`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Theme | `selectedTheme` | `smartvisuals` (SmartVisuals), `dark` (Dark), `clean` (Clean), `slate` (Slate) |
| Background Color (Empty = Theme) | `bgColor` | Colour |
| Transparent Background | `transparentBg` | On / off |

### Diagnostics (`diagnostics`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Warn About Rows That Are Not Dates | `showSkipped` | On / off |
| Show Where The Clock Comes From | `showClockConfidence` | On / off |
