# SmartVisuals KPI Card for Power BI

> KPI cards for Power BI, one per measure or per branch: target, prior year, states and sparklines free. Premium: pace to target, required run-rate and landing.

- Page: https://www.smartvisuals.io/visuals/kpi-card
- Fields and settings: https://www.smartvisuals.io/visuals/kpi-card/settings
- Microsoft Marketplace: https://marketplace.microsoft.com/en-us/product/smartvisuals.smartvisuals-kpi-card?tab=overview
- Package: https://www.smartvisuals.io/downloads/smartvisuals-kpi-card-1.0.1.0.pbiviz
- 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: no
- Version: 1.0.1.0
- GUID (visualType and publicCustomVisuals): `smartKPICard473083EB23844DB9B81511A7524D309F`

## What is free

- **Cards from your fields**: Up to six measures side by side, or one card per branch from a field in Cards by, two levels with drill-down, up to 500 cards and an optional Total card.
- **Target, comparison and change**: Variance as percent, absolute or both, percentage points for rates, one comparison such as prior year, and the change against the previous period.
- **States you name**: Good and warning boundaries you set, higher or lower is better per visual, per measure or per card, an icon whose shape is the state, and your own words.
- **Sparklines and progress bar**: Line, area, columns or win / loss against target, with the target line, markers and first and last values; a progress bar with the percent of target.
- **Detail values, images and fx**: Up to four secondary numbers per card, an image per card from a data URI, and conditional formatting on card, accent, value and sparkline colours.
- **Layouts, templates and themes**: Auto, grid, one row or one column; six style templates with export and import; four themes: SmartVisuals, Dark, Clean (White) and Slate.
- **Accessible, in 20 languages**: Keyboard navigation, screen-reader labels, high contrast, a minimum text size and Reduce motion.

## What premium adds

- **Pace to target**: Where the KPI should be today, year, quarter, month or week to date, in calendar or working days, or along the plan's own shape: ahead or behind in money and days, a pace marker and a pace chart.
- **Required run-rate**: What each remaining day, working day or period must bring to reach the target, and the date the current rate gets there.
- **Forecast landing**: Where the period will end, plan-shaped, by run-rate or from recent periods, with the gap to target and an 80, 90 or 95 % prediction range.
- **Variance breakdown**: Each card's variance split by a field such as Branch into its largest contributors and Others, adding up to the card's variance.
- **Second comparison**: A second reference next to the first, such as prior year and forecast, with its own variance.
- **States judged against the pace**: A card ahead of where it should be today reads good, even before the full-period target is reached.

## Fields

| Field | Internal name | Takes | Needed | What it is for |
| --- | --- | --- | --- | --- |
| Cards by | `category` | Column | Optional, up to 2 | One card per value: branch, product, region or person. Leave empty for one card per measure. |
| Trend axis | `period` | Column | Optional | Optional date or period: the latest period is the card's value, the history draws the sparkline and the pace chart. |
| Break down by | `breakdown` | Column | Optional | Optional field to break each card's variance down by (premium). |
| Image | `image` | Column | Optional | Optional image per card: a text column holding a data:image/...;base64 value (images are never loaded from a web address). |
| Value | `value` | Measure | Optional, up to 6 | The KPI. Several measures give several cards. |
| Target | `target` | Measure | Optional, up to 6 | Plan, budget or goal, in the same order as the Value measures. |
| Comparison | `comparison` | Measure | Optional, up to 6 | Prior year, forecast or any value to compare with, in the same order as the Value measures. |
| Second comparison | `comparison2` | Measure | Optional, up to 6 | A second value to compare with (premium). |
| Detail values | `details` | Measure | Optional, up to 4 | Small extra numbers listed on every card. |
| Lower is better | `lowerIsBetter` | Measure | Optional | Optional 1 / 0 per card where a lower value is better (costs, defects, lead time). Aggregate with Max. |
| Elapsed % | `elapsed` | Measure | Optional | Share of the period elapsed (0 to 1), for pace from a field. |
| As-of date | `asOf` | Measure | Optional | Optional date the data is current to; pace can count from it instead of the reader's clock. Aggregate with Max. |
| Tooltips | `tooltips` | Measure | Optional, up to 5 | Extra measures shown 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`).

### Style template (`templates`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Template | `template` | `none` (Default), `executive` (Executive), `compact` (Compact), `ibcs` (Finance (IBCS style)), `presentation` (Presentation), `print` (Print), `wallboard` (Wallboard), `custom` (Custom) |
| Export: copy this template | `exportText` | Text |
| Import: paste a template | `importText` | Text |
| Applied | `applied` | Text |
| Imported hash | `importedHash` | Text |

### Theme (`theme`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Theme | `selectedTheme` | `smartvisuals` (SmartVisuals), `dark` (Dark), `clean` (Clean (White)), `slate` (Slate) |
| Font | `fontFamily` | `inter` (Inter), `segoe` (Segoe UI), `arial` (Arial), `georgia` (Georgia) |
| Transparent background | `transparentBg` | On / off |
| Background color | `backgroundColor` | Colour |

### Layout (`layout`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Arrange cards | `mode` | `auto` (Auto), `grid` (Grid), `row` (One row), `column` (One column) |
| Columns (0 = auto) | `columns` | Number |
| Smallest card width | `minCardWidth` | Number |
| Smallest card height | `minCardHeight` | Number |
| Space between cards | `gap` | Number |
| Sort | `sortBy` | `data` (Data order (follows Power BI sort)), `worst` (Worst first), `best` (Best first), `name` (Name, A to Z), `value` (Value, high to low) |
| Total card | `totalCard` | On / off |
| Align content | `align` | `left` (Left), `center` (Center) |
| Sparkline position | `sparkPlacement` | `auto` (Auto), `below` (Below the value), `side` (Beside the value) |

### Card (`card`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Card color | `background` | Colour |
| Border color | `borderColor` | Colour |
| Border width (-1 = theme) | `borderWidth` | Number |
| Corner radius (-1 = theme) | `cornerRadius` | Number |
| Shadow | `shadow` | `theme` (Theme default), `on` (On), `off` (Off) |
| Padding | `padding` | Number |
| Accent bar | `accent` | `theme` (Theme default), `left` (Left), `top` (Top), `bottom` (Bottom), `none` (None) |
| Accent color | `accentColor` | Colour |

### Card title (`title`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Text size | `fontSize` | Number |
| Color | `color` | Colour |
| Bold | `bold` | On / off |
| Uppercase | `uppercase` | On / off |
| Wrap to two lines | `wrap` | On / off |
| Image size | `imageSize` | Number |

### Subtitle (`subtitle`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Text size | `fontSize` | Number |
| Color | `color` | Colour |

### Value (`value`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Text size (0 = fit the card) | `fontSize` | Number |
| Smallest size when fitting | `minAutoSize` | Number |
| Largest size when fitting | `maxAutoSize` | Number |
| Color | `color` | Colour |
| Bold | `bold` | On / off |
| Display units | `displayUnits` | `auto` (Auto), `none` (None), `thousands` (Thousands), `millions` (Millions), `billions` (Billions) |
| Decimal places (-1 = auto) | `decimals` | Number |
| Prefix | `prefix` | Text |
| Suffix | `suffix` | Text |
| Value from | `aggregation` | `latest` (Latest period), `sum` (Sum of periods), `average` (Average of periods) |
| Show the period | `showPeriod` | On / off |

### Target (`target`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Variance to target | `show` | On / off |
| Show variance as | `mode` | `pct` (Percent), `abs` (Absolute), `both` (Absolute and percent) |
| Target value | `showValue` | On / off |
| Name of the target | `showLabel` | On / off |
| Label (blank = field name) | `label` | Text |
| Text size | `fontSize` | Number |
| Label color | `color` | Colour |

### Comparison (`comparison`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Show variance as | `mode` | `pct` (Percent), `abs` (Absolute), `both` (Absolute and percent) |
| Comparison value | `showValue` | On / off |
| Name of the comparison | `showLabel` | On / off |
| First label (blank = field name) | `label` | Text |
| Second comparison | `showSecond` | On / off |
| Second label (blank = field name) | `label2` | Text |
| Text size | `fontSize` | Number |
| Label color | `color` | Colour |

### Variance style (`variance`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Draw as | `style` | `text` (Colored text), `chip` (Chip), `plain` (Plain text) |
| Arrows | `arrows` | On / off |
| Good and bad colors | `colorByDirection` | On / off |
| Change vs previous period | `showChange` | On / off |

### States (`states`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show states | `show` | On / off |
| Judge against | `basis` | `target` (Target), `comparison` (Comparison), `comparison2` (Second comparison) |
| Direction | `polarity` | `higher` (Higher is better), `lower` (Lower is better) |
| Good from (% of reference) | `goodFrom` | Number |
| Warning from (% of reference), bad below | `warnFrom` | Number |
| Color the accent bar | `accent` | On / off |
| Tint the card | `tint` | On / off |
| Color the value | `valueColor` | On / off |
| State icon | `icon` | On / off |
| State word | `word` | On / off |
| Word for good | `goodWord` | Text |
| Word for warning | `warnWord` | Text |
| Word for bad | `badWord` | Text |
| Word size | `fontSize` | Number |
| Good | `goodColor` | Colour |
| Warning | `warnColor` | Colour |
| Bad | `badColor` | Colour |
| No state | `neutralColor` | Colour |

### Sparkline (`sparkline`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Type | `type` | `line` (Line), `area` (Area), `column` (Columns), `winloss` (Win / loss vs target), `pace` (Pace chart (cumulative vs plan)) |
| Color | `color` | Colour |
| Line width | `lineWidth` | Number |
| Height (% of the card, 0 = auto) | `height` | Number |
| Target line | `showTarget` | On / off |
| Target line color | `targetColor` | Colour |
| Markers | `markers` | `last` (Last point), `minmax` (High, low and last), `all` (All points), `none` (None) |
| First and last value | `showLabels` | On / off |
| Label size | `labelSize` | Number |
| Label color | `labelColor` | Colour |
| Start the scale at zero | `zeroBaseline` | On / off |

### Progress bar (`progress`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Bar height | `height` | Number |
| Bar color | `color` | Colour |
| Track color | `trackColor` | Colour |
| Percent of target | `showLabel` | On / off |
| Label size | `fontSize` | Number |
| Label color | `labelColor` | Colour |

### Detail values (`details`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Text size | `fontSize` | Number |
| Value color | `color` | Colour |
| Label color | `labelColor` | Colour |

### Pace to target (`pace`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Period | `mode` | `none` (Off), `year` (Year to date), `quarter` (Quarter to date), `month` (Month to date), `week` (Week to date), `fixed` (Fixed %), `measure` (Elapsed % field), `axis` (The trend axis (plan to its end)) |
| Today is | `today` | `clock` (The reader's clock), `asOf` (The As-of date field) |
| Fiscal year starts in month | `fiscalStartMonth` | Number |
| Count | `dayCount` | `calendar` (Calendar days), `working` (Working days) |
| Working week | `weekMask` | `monFri` (Monday to Friday), `monSat` (Monday to Saturday), `sunThu` (Sunday to Thursday) |
| Elapsed % | `fixedElapsed` | Number |
| The series holds | `series` | `period` (Amounts per period), `cumulative` (Running totals) |
| Expected by now from | `expectedFrom` | `even` (An even pace), `plan` (The plan's own shape) |
| On pace within (± % of target) | `band` | Number |
| Pace line on the card | `show` | On / off |
| Days ahead or behind | `showDays` | On / off |
| Pace marker on the progress bar | `showMarker` | On / off |
| Required run-rate | `showRequired` | On / off |
| Judge the state against the pace | `stateOnPace` | On / off |
| Text size | `fontSize` | Number |
| Text color | `color` | Colour |
| Marker color | `markerColor` | Colour |

### Forecast landing (`landing`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show the landing | `show` | On / off |
| Method | `method` | `shaped` (Plan-shaped (run-rate without a plan)), `runRate` (Run-rate (value ÷ progress)), `recent` (Recent periods) |
| Recent periods (n) | `recentPeriods` | Number |
| Landing range | `showRange` | On / off |
| Range level | `level` | `80` (80 %), `90` (90 %), `95` (95 %) |
| Landing vs target | `showVariance` | On / off |
| Text size | `fontSize` | Number |
| Text color | `color` | Colour |

### Variance breakdown (`breakdown`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show the breakdown | `show` | On / off |
| Variance to | `reference` | `target` (Target), `comparison` (Comparison), `comparison2` (Second comparison) |
| Rows (then Others) | `topN` | Number |
| Order | `sort` | `impact` (Largest impact first), `worst` (Worst first), `best` (Best first) |
| Numbers | `values` | `abs` (Absolute), `points` (Points of the variance %), `none` (None) |
| Text size | `fontSize` | Number |
| Text color | `color` | Colour |

### Summary sentence (`summary`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Position | `position` | `top` (Top), `bottom` (Bottom) |
| Text size | `fontSize` | Number |
| Color | `color` | Colour |

### Data notes (`notes`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Text size | `fontSize` | Number |
| Color | `color` | Colour |

### Animation (`animation`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Animate on load | `mode` | `off` (Off), `on` (Fade in and draw) |
| Duration (ms) | `duration` | Number |

### Accessibility (`accessibility`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Focus outline color | `focusColor` | Colour |
| Focus outline width | `focusWidth` | Number |
| Minimum text size (0 = off) | `minFontSize` | Number |
| Reduce motion | `reduceMotion` | `system` (Follow system), `always` (Always reduce), `off` (Off) |
| Shapes with the state colors | `shapes` | On / off |

### Direction per measure (`measureDirection`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Direction per measure | `direction` | `auto` (As in States), `higher` (Higher is better), `lower` (Lower is better) |
