Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Apply, inspect, and compare Power BI report themes and conditional formatting rules using pbi-cli. Invoke this skill whenever the user mentions "theme", "colours", "colors", "branding", "dark mode", "corporate theme", "styling", "conditional formatting", "colour scale", "gradient", "data bars", "background colour", "formatting rules", "visual formatting", or wants to change the overall look-and-feel of a report or apply data-driven formatting to specific visuals.
.claude/skills/minasaad1-power-bi-themes/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 5% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -37% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -37% | 0% |
Manage report-wide themes and per-visual conditional formatting. No Power BI Desktop connection is needed.
Power BI themes are JSON files that define colours, fonts, and visual defaults for the entire report. Apply one with:
bashpbi report set-theme --file corporate-theme.json
This copies the theme file into the report's StaticResources/RegisteredResources/ folder and updates report.json to reference it. The theme takes effect when the report is opened in Power BI Desktop.
bashpbi report get-theme
Returns:
base_theme -- the built-in theme name (e.g. "CY24SU06")custom_theme -- custom theme name if one is applied (or null)theme_data -- full JSON of the custom theme file (if it exists)Before applying a new theme, preview what would change:
bashpbi report diff-theme --file proposed-theme.json
Returns:
current / proposed -- display namesadded -- keys in proposed but not currentremoved -- keys in current but not proposedchanged -- keys present in both but with different valuesThis helps catch unintended colour changes before committing.
A Power BI theme JSON file typically contains:
json{ "name": "Corporate Brand", "dataColors": ["#0078D4", "#00BCF2", "#FFB900", "#D83B01", "#8661C5", "#00B294"], "background": "#FFFFFF", "foreground": "#252423", "tableAccent": "#0078D4", "visualStyles": { ... } }
Key sections:
dataColors -- palette for data series (6-12 colours recommended)background / foreground -- page and text defaultstableAccent -- header colour for tables and matricesvisualStyles -- per-visual-type overrides (font sizes, padding, etc.)See Microsoft theme documentation for the full schema.
These properties look plausible but are not in PBI's theme schema. Including them causes PBI Desktop to fail silently or crash when loading the report:
| Property | Location | Why invalid | |---|---|---| | "radius": 8 | Inside border objects in visualStyles | Borders only accept color and show | | "page": { ... } | Top-level key | Legacy pbiviz format — not valid in report themes | | "dropShadow": { "position": "Inner" } | Inside visualStyles | No position sub-property exists for dropShadow |
Safe top-level keys for a custom theme: name, dataColors, background, foreground, tableAccent, visualStyles, textClasses, outspaceColor, borderColor, shapeColors
Always use pbi report diff-theme to preview changes before applying, and open the report in Desktop once to confirm it loads before committing the file.
Apply data-driven formatting to individual visuals:
bash# Gradient background (colour scale from min to max) pbi format background-gradient visual_abc --page page1 \ --table Sales --column Revenue \ --min-color "#FFFFFF" --max-color "#0078D4" # Rules-based background (specific value triggers a colour) pbi format background-conditional visual_abc --page page1 \ --table Sales --column Status --value "Critical" --color "#FF0000" # Measure-driven background (a DAX measure returns the colour) pbi format background-measure visual_abc --page page1 \ --table Sales --measure "Status Color" # Inspect current formatting rules pbi format get visual_abc --page page1 # Clear all formatting rules on a visual pbi format clear visual_abc --page page1
bash# 1. Create the theme file cat > brand-theme.json << 'EOF' { "name": "Acme Corp", "dataColors": ["#1B365D", "#5B8DB8", "#E87722", "#00A3E0", "#6D2077", "#43B02A"], "background": "#F8F8F8", "foreground": "#1B365D", "tableAccent": "#1B365D" } EOF # 2. Preview the diff against the current theme pbi report diff-theme --file brand-theme.json # 3. Apply it pbi report set-theme --file brand-theme.json # 4. Verify pbi report get-theme
bashpbi --json report get-theme pbi --json report diff-theme --file proposed.json pbi --json format get vis1 --page p1
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 8,538 | 2,705 | -68% | 1 | 1 | 0% | 1,407 | 1,664 | +18% | 0 | 0 | — |
case-02 | fail→pass | 11,582 | 3,251 | -72% | 1 | 1 | 0% | 1,705 | 1,786 | +5% | 0 | 0 | — |
case-03 | fail→pass | 12,926 | 2,510 | -81% | 1 | 1 | 0% | 2,255 | 1,611 | -29% | 0 | 0 | — |
case-04 | fail→pass | 15,361 | 2,125 | -86% | 1 | 1 | 0% | 2,494 | 1,559 | -37% | 0 | 0 | — |
case-05 | fail→pass | 17,122 | 2,397 | -86% | 1 | 1 | 0% | 2,615 | 1,657 | -37% | 0 | 0 | — |
case-06 | fail→pass | 13,036 | 2,286 | -82% | 1 | 1 | 0% | 2,071 | 1,611 | -22% | 0 | 0 | — |
case-07 | fail→pass | 16,020 | 1,967 | -88% | 1 | 1 | 0% | 2,432 | 1,502 | -38% | 0 | 0 | — |
case-08 | fail→pass | 10,841 | 1,651 | -85% | 1 | 1 | 0% | 1,603 | 1,466 | -9% | 0 | 0 | — |
case-09 | fail→pass | 16,512 | 4,170 | -75% | 1 | 1 | 0% | 2,787 | 1,915 | -31% | 0 | 0 | — |
case-10 | fail→pass | 10,655 | 3,381 | -68% | 1 | 1 | 0% | 1,690 | 1,812 | +7% | 0 | 0 | — |
case-11 | pass→pass | 10,128 | 3,473 | -66% | 1 | 1 | 0% | 1,562 | 1,840 | +18% | 0 | 0 | — |
case-12 | fail→pass | 12,160 | 3,575 | -71% | 1 | 1 | 0% | 2,137 | 1,864 | -13% | 0 | 0 | — |
case-13 | fail→pass | 7,942 | 2,574 | -68% | 1 | 1 | 0% | 1,302 | 1,605 | +23% | 0 | 0 | — |
case-14 | pass→pass | 8,256 | 3,300 | -60% | 1 | 1 | 0% | 1,328 | 1,504 | +13% | 0 | 0 | — |
case-15 | pass→pass | 14,843 | 2,944 | -80% | 1 | 1 | 0% | 2,479 | 1,668 | -33% | 0 | 0 | — |
case-16 | fail→pass | 10,290 | 2,928 | -72% | 1 | 1 | 0% | 1,532 | 1,604 | +5% | 0 | 0 | — |
case-17 | pass→pass | 10,877 | 1,771 | -84% | 1 | 1 | 0% | 1,669 | 1,508 | -10% | 0 | 0 | — |
case-18 | fail→pass | 16,057 | 3,330 | -79% | 1 | 1 | 0% | 2,526 | 1,777 | -30% | 0 | 0 | — |
case-19 | pass→pass | 5,697 | 2,189 | -62% | 1 | 1 | 0% | 860 | 1,520 | +77% | 0 | 0 | — |
case-20 | fail→pass | 6,546 | 6,170 | -6% | 1 | 1 | 0% | 1,209 | 2,292 | +90% | 0 | 0 | — |
case-21 | fail→fail | 14,175 | 11,451 | -19% | 1 | 1 | 0% | 2,673 | 3,572 | +34% | 0 | 0 | — |
case-22 | fail→fail | 9,883 | 8,482 | -14% | 1 | 1 | 0% | 1,582 | 2,642 | +67% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +68 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.