pbir-conditional-formattinglisted
Install: claude install-skill wardawgmalvicious/claude-config
## PBIR Conditional Formatting Reference
Three approaches: measure-based (flexible), `FillRule` gradients (no DAX), and rule-based `Conditional` (UI-generated).
### Approach Matrix
| Approach | Best For | Pros | Cons |
|---|---|---|---|
| Measure-based | Custom logic, theme colors | Full DAX, readable | Requires extension measure |
| `linearGradient2` / `linearGradient3` | Color scales | No DAX | Gradients only |
| `Conditional.Cases` | UI-portable rules | Power BI UI round-trips | Verbose |
### Supported Properties
Not every property accepts measure expressions. These do:
`fill`, `borderColor`, `defaultColor`, `fontColor`, `color`, `backgroundColor`, `lineColor`, `markerColor`, `strokeColor`, `text`, `titleText`, `fontSize`, `strokeWidth`, `weight`, `transparency`, `radius`, `url`, `good`, `bad`, `neutral`, `target`, `icon`
Everything else is literal-only or `ThemeDataColor`.
### dataViewWildcard Selector
The key to per-point formatting.
| `matchingOption` | Behavior |
|---|---|
| `0` | Identities + totals (series-level) |
| `1` | Per data point (most common for CF) |
| `2` | Totals only |
```json
"selector": {"data": [{"dataViewWildcard": {"matchingOption": 1}}]}
```
Wrong for per-point: `"selector": {"metadata": "Sales.Revenue"}` — evaluates once per series.
### Two-Entry Array Pattern (Required)
`dataPoint`, `lineStyles`, `error` require a two-entry array: base entry + conditional entry.
```json
"dataPoint": [
{"properties": {}},
{
"properties": {