# SmartVisuals Trading Cards for Power BI

> Power BI visual showing reps, products or branches as stat cards: percentile ranks, a power score and rarity tiers, flip for detail, duel. Free up to 5 cards.

- Page: https://www.smartvisuals.io/visuals/trading-cards
- Fields and settings: https://www.smartvisuals.io/visuals/trading-cards/settings
- Microsoft Marketplace: https://marketplace.microsoft.com/en-us/product/smartvisuals.smartvisuals-trading-cards?tab=overview
- Package: https://www.smartvisuals.io/downloads/smartvisuals-trading-cards-1.0.0.0.pbiviz
- Sample report (zipped .pbip): https://www.smartvisuals.io/samples/smartvisuals-trading-cards-sample-1.0.0.0.zip
- Price: Free tier for every viewer; premium $2.99 per user per month or $29 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.0.0
- GUID (visualType and publicCustomVisuals): `tradingCardsED3A70C07F4B48958575755F3C103682`

## What is free

- **A team of five, full format**: Up to 5 cards with everything the format has. With more entities, a reader without a licence sees the first 5 in your sort and "Showing 5 of N"; ranks are still computed on the whole deck.
- **Ranks and percentiles**: Every stat ranked against the deck as a percentile, ties shared, with a bar, a rank ("3rd of 24") and a Best in deck star; Lower Is Better per stat.
- **Power score and weights**: The average of a card's stat percentiles, 0 to 100, with Weight In Power Score per stat (0 = shown but not counted).
- **Default rarity tiers**: Common, Rare, Epic and Legendary at 40, 70 and 90, by rank in the deck or by power score, carried by shape, pips and word as well as colour.
- **Flip for the detail**: The back lists every stat with its value, percentile and rank. Flip with the button, the F key or Flip all.
- **Spotlight and Boardroom**: One large card with its back beside it, stepped by hand; or Style > Boardroom, the same deck as a plain ranked table.
- **Photos from a column or a measure**: Picture takes image data URIs; Picture (Measure) takes photos over the 32,766-character column limit. No photo: a monogram crest.
- **Four themes and conditional formatting**: SmartVisuals, Dark, Clean and Slate, set colours by real set name, a Card Accent colour with conditional formatting (fx), dynamic format strings, set chips and sorting by power, name or any stat.
- **Built for real reports**: Cross-filtering, multi-select, highlight, tooltips and report page tooltips, the context menu and bookmarks; keyboard, screen reader, high contrast, reduced motion, the Accessibility card and 20 languages.

## What premium adds

- **The whole team**: More than 5 cards, up to 500.
- **Targets and last year**: Compare with a target or a prior period per stat: the change, tier movement and a Rising badge. Target Status Colors mark each stat met, near or missed, by mark and word as well as colour.
- **My card**: Each viewer's own card ringed and marked You, by name or by a USERPRINCIPALNAME() measure; Spotlight opens on it.
- **Duel**: Any two cards stat by stat, or a card against the team average or the top performer: the winner, the gap in the stat's own format, the percentile gap and the tally ("Anna Schmidt wins 4-0").
- **Custom tiers**: Your own thresholds and tier names, such as Bronze to Platinum.
- **History**: A sparkline per stat on the back of the card, from a period column.
- **Wall mode**: The Spotlight cycles the ranked team on a TV, with a pause button.
- **Collector skins**: Holo Foil, Vintage and Arcade finishes on top of the four free themes.

## Fields

| Field | Internal name | Takes | Needed | What it is for |
| --- | --- | --- | --- | --- |
| Card | `card` | Column | Optional | One card per value: a rep, a product, a branch. |
| Set | `group` | Column | Optional | The card's set or class (region, product family): the set line, the set colour and the deck filter. |
| Picture | `image` | Column | Optional | A picture per card as a base64 image data URI (data:image/png;base64,...), for example a Power Query column. Web addresses are never loaded: the visual makes no external calls. |
| Picture (Measure) | `pictureMeasure` | Measure | Optional | The picture as a text measure that returns an image data URI. A measure is not held to the 32,766-character limit of a text column, so larger photos work (join a picture stored in chunks with CONCATENATEX). Wins over Picture when both are bound. |
| Caption | `caption` | Column | Optional | A short line of text per card, such as "Joined 2019". |
| History | `period` | Column | Optional | A period column (months, quarters): a sparkline per stat on the back of the card. Premium. |
| Stats | `stats` | Measure | Optional, up to 8 | The numbers on the card, up to eight. Each is ranked against the deck as a percentile. |
| Compare | `compare` | Measure | Optional, up to 8 | A target or prior-period value for each stat, in the same order as Stats: change, trend arrow and tier movement. Premium. |
| My Card | `mine` | Measure | Optional | A measure that is not zero for the viewer's own card, for example IF(SELECTEDVALUE(Reps[Email]) = USERPRINCIPALNAME(), 1): that card is ringed and marked You. Premium. |
| 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`).

### Theme (`theme`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Theme | `selectedTheme` | `smartvisuals` (SmartVisuals), `dark` (Dark), `clean` (Clean), `slate` (Slate) |
| Collector Skin | `skin` | `none` (None (theme)), `holo` (Holo Foil), `vintage` (Vintage), `arcade` (Arcade) |
| Transparent Background | `transparentBg` | On / off |

### Layout (`layout`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Layout | `layout` | `deck` (Deck), `spotlight` (Spotlight), `duel` (Duel (head to head)) |
| Style | `style` | `collectible` (Collectible cards), `boardroom` (Boardroom (plain table)) |
| Vocabulary | `vocabulary` | `collectible` (Collectible (tiers, power, duel)), `business` (Business (bands, score, compare)) |
| Card Size | `cardSize` | `s` (Small), `m` (Medium), `l` (Large) |
| Columns (0 = Auto) | `columns` | Number |
| Stats On The Front | `statsOnFront` | Number |
| Sort By | `sortBy` | `power` (Power score), `name` (Name), `data` (As in the data), `stat0` (Stat 1), `stat1` (Stat 2), `stat2` (Stat 3), `stat3` (Stat 4), `stat4` (Stat 5), `stat5` (Stat 6), `stat6` (Stat 7), `stat7` (Stat 8) |
| Click Flips Card | `clickFlips` | On / off |
| Wall Mode: Auto-Advance (s, 0 = Off) | `spotlightSeconds` | Number |
| Deal-In Animation | `dealIn` | On / off |
| Show Toolbar | `showToolbar` | On / off |
| Show Status Strip | `showStatus` | On / off |

### Card Face (`face`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show Picture | `showPicture` | On / off |
| Picture Fit | `pictureFit` | `cover` (Fill the window), `contain` (Whole picture) |
| Show Set Line | `showSet` | On / off |
| Show Card Number | `showNumber` | On / off |
| Show Power Score | `showPower` | On / off |
| Show Percentile Bars | `showBars` | On / off |
| Show Percentile Numbers | `showPctNumbers` | On / off |
| Show Caption | `showCaption` | On / off |
| Show Badges | `showBadges` | On / off |
| Footer Text | `footerText` | Text |

### Tiers (`tiers`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Tier By | `basis` | `deck` (Rank in the deck), `score` (Power score) |
| Legendary From (Percentile) | `legendary` | Number |
| Epic From (Percentile) | `epic` | Number |
| Rare From (Percentile) | `rare` | Number |
| Legendary Name | `nameLegendary` | Text |
| Epic Name | `nameEpic` | Text |
| Rare Name | `nameRare` | Text |
| Common Name | `nameCommon` | Text |

### Stats (`stats`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Label | `label` | Text |
| Lower Is Better | `lowerIsBetter` | On / off |
| Weight In Power Score | `weight` | Number |
| Combine Periods By | `combine` | `auto` (Auto), `sum` (Sum), `avg` (Average), `latest` (Latest), `max` (Maximum), `min` (Minimum) |

### Compare (`compare`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Compare Is | `mode` | `prior` (A prior period), `target` (A target) |
| Show Change As | `deltaAs` | `both` (Amount and percent), `amount` (Amount), `percent` (Percent) |
| Show Tier Movement | `showMovement` | On / off |
| Target Status Colors | `statusColors` | On / off |
| Near Target Within (%) | `nearPct` | Number |
| Met Color | `colorMet` | Colour |
| Near Color | `colorNear` | Colour |
| Missed Color | `colorMissed` | Colour |

### Duel (`duel`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Opponent | `opponent` | `card` (A chosen card), `top` (Top performer), `average` (Team average) |
| Left Card | `left` | Text |
| Right Card | `right` | Text |

### My Card (`mine`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Card Name | `cardName` | Text |

### Sets (`sets`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Color | `color` | Colour |

### Card Accent (`accent`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Accent | `fill` | Colour |

### Numbers (`numbers`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Display | `display` | `full` (Full (1,240)), `compact` (Compact (1.2K)) |
| Decimals | `decimals` | `auto` (Auto), `0`, `1`, `2` |

### Colors (`colors`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Background | `bg` | Colour |
| Card Face | `face` | Colour |
| Text | `ink` | Colour |
| Labels | `muted` | Colour |
| Percentile Bars | `bar` | Colour |
| Common | `tierCommon` | Colour |
| Rare | `tierRare` | Colour |
| Epic | `tierEpic` | Colour |
| Legendary | `tierLegendary` | Colour |

### Accessibility (`accessibility`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Reduce Motion | `reduceMotion` | `system` (Follow system setting), `always` (Always reduce), `off` (Off (always animate)) |
| Focus Outline Color | `focusColor` | Colour |
| Focus Outline Width (px) | `focusWidth` | Number |
| Minimum Text Size (px, 0 = Off) | `minFontSize` | Number |
