Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Add, configure, bind data to, and bulk-manage visuals on Power BI PBIR report pages using pbi-cli. Invoke this skill whenever the user mentions "add a chart", "bar chart", "line chart", "card", "KPI", "gauge", "scatter", "table visual", "matrix", "slicer", "combo chart", "bind data", "visual type", "visual layout", "resize visuals", "bulk update visuals", "bulk delete", "visual calculations", or wants to place, move, bind, or remove any visual on a report page. Also invoke when the user asks wha
.claude/skills/minasaad1-power-bi-visuals/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 82% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 12% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 34% | 0% |
Create and manage visuals on PBIR report pages. No Power BI Desktop connection is needed -- these commands operate directly on JSON files.
bash# Add by alias (pbi-cli resolves to the PBIR type) pbi visual add --page page_abc123 --type bar pbi visual add --page page_abc123 --type card --name "Revenue Card" # Custom position and size (pixels) pbi visual add --page page_abc123 --type scatter \ --x 50 --y 400 --width 600 --height 350 # Named visual for easy reference pbi visual add --page page_abc123 --type combo --name sales_combo
Each visual is created as a folder with a visual.json file inside the page's visuals/ directory. The template includes the correct schema URL and queryState roles for the chosen type.
visual bind writes field references into the visual JSON. It does not create measures — it only records that a measure should exist. If the measure is missing from the TMDL, every visual bound to it will show an error in Desktop.
Before binding any visual to a measure, verify the measure exists:
bash# Option A: create it via pbi-cli (requires pbi connect) pbi connect pbi measure create "Total Revenue" -e "SUM(Fact_Sales[Total_Revenue])" -t Fact_Sales # Option B: check existing measures in the TMDL file directly # Look for `measure '...' =` lines in SemanticModel/definition/tables/*.tmdl
After adding measures directly to a TMDL file (without pbi connect): close and reopen the .pbip file in Power BI Desktop. Desktop only reads TMDL on file open — it does not hot-reload TMDL changes made on disk.
Checklist before opening Desktop:
--field, --value, --indicator reference points to a real measure or column in the TMDL"Fact_Sales" ≠ "fact_sales""Total Revenue" ≠ "Total_Revenue"Visuals start empty. Use visual bind with Table[Column] notation to connect them to your semantic model. The bind options vary by visual type -- see the type table below.
bash# Bar chart: category axis + value pbi visual bind mybar --page p1 \ --category "Geography[Region]" --value "Sales[Revenue]" # Card: single field pbi visual bind mycard --page p1 --field "Sales[Total Revenue]" # Matrix: rows + values + optional column pbi visual bind mymatrix --page p1 \ --row "Product[Category]" --value "Sales[Amount]" --value "Sales[Quantity]" # Scatter: X, Y, detail, optional size and legend pbi visual bind myscatter --page p1 \ --x "Sales[Quantity]" --y "Sales[Revenue]" --detail "Product[Name]" # Combo chart: category + column series + line series pbi visual bind mycombo --page p1 \ --category "Calendar[Month]" --column "Sales[Revenue]" --line "Sales[Margin]" # KPI: indicator + goal + trend axis pbi visual bind mykpi --page p1 \ --indicator "Sales[Revenue]" --goal "Sales[Target]" --trend "Calendar[Date]" # Gauge: value + max/target pbi visual bind mygauge --page p1 \ --value "Sales[Revenue]" --max "Sales[Target]"
Binding uses ROLE_ALIASES to translate friendly names like --value into the PBIR role name (e.g. Y, Values, Data). Measure vs Column is inferred from the role: value/indicator/goal/max roles create Measure references, category/row/detail roles create Column references. Override with --measure flag if needed.
bash# List all visuals on a page pbi visual list --page page_abc123 # Get full details of one visual pbi visual get visual_def456 --page page_abc123 # Move, resize, or toggle visibility pbi visual update vis1 --page p1 --width 600 --height 400 pbi visual update vis1 --page p1 --x 100 --y 200 pbi visual update vis1 --page p1 --hidden pbi visual update vis1 --page p1 --visible # Delete a visual pbi visual delete visual_def456 --page page_abc123
Set border, background, or title on the visual container itself:
bashpbi visual set-container vis1 --page p1 --background "#F0F0F0" pbi visual set-container vis1 --page p1 --border-color "#CCCCCC" --border-width 2 pbi visual set-container vis1 --page p1 --title "Sales by Region"
Add DAX calculations that run inside the visual scope:
bashpbi visual calc-add vis1 --page p1 --role Values \ --name "RunningTotal" --expression "RUNNINGSUM([Revenue])" pbi visual calc-list vis1 --page p1 pbi visual calc-delete vis1 --page p1 --name "RunningTotal"
Operate on many visuals at once by filtering with --type or --name-pattern:
bash# Find visuals matching criteria pbi visual where --page overview --type barChart pbi visual where --page overview --type kpi --y-min 300 # Bind the same field to ALL bar charts on a page pbi visual bulk-bind --page overview --type barChart \ --category "Date[Month]" --value "Sales[Revenue]" # Resize all KPI cards pbi visual bulk-update --page overview --type kpi --width 250 --height 120 # Hide all visuals matching a pattern pbi visual bulk-update --page overview --name-pattern "Temp_*" --hidden # Delete all placeholders pbi visual bulk-delete --page overview --name-pattern "Placeholder_*"
Filter options for where, bulk-bind, bulk-update, bulk-delete:
--type -- PBIR visual type or alias (e.g. barChart, bar)--name-pattern -- fnmatch glob on visual name (e.g. Chart_*)--x-min, --x-max, --y-min, --y-max -- position bounds (pixels)All bulk commands require at least --type or --name-pattern to prevent accidental mass operations.
| Alias | PBIR Type | Bind Options | |--------------------|------------------------------|-----------------------------------------------| | bar | barChart | --category, --value, --legend | | line | lineChart | --category, --value, --legend | | column | columnChart | --category, --value, --legend | | area | areaChart | --category, --value, --legend | | ribbon | ribbonChart | --category, --value, --legend | | waterfall | waterfallChart | --category, --value, --breakdown | | stacked_bar | stackedBarChart | --category, --value, --legend | | clustered_bar | clusteredBarChart | --category, --value, --legend | | clustered_column | clusteredColumnChart | --category, --value, --legend | | scatter | scatterChart | --x, --y, --detail, --size, --legend | | funnel | funnelChart | --category, --value | | combo | lineStackedColumnComboChart | --category, --column, --line, --legend | | donut / pie | donutChart | --category, --value, --legend | | treemap | treemap | --category, --value |
| Alias | PBIR Type | Bind Options | |--------------------|------------------------------|-----------------------------------------------| | card | card | --field | | card_visual | cardVisual | --field (modern card) | | card_new | cardNew | --field | | multi_row_card | multiRowCard | --field | | kpi | kpi | --indicator, --goal, --trend | | gauge | gauge | --value, --max / --target |
| Alias | PBIR Type | Bind Options | |--------------------|------------------------------|-----------------------------------------------| | table | tableEx | --value | | matrix | pivotTable | --row, --value, --column |
| Alias | PBIR Type | Bind Options | |--------------------|------------------------------|-----------------------------------------------| | slicer | slicer | --field | | text_slicer | textSlicer | --field | | list_slicer | listSlicer | --field | | advanced_slicer | advancedSlicerVisual | --field (tile/image slicer) |
| Alias | PBIR Type | Bind Options | |--------------------|------------------------------|-----------------------------------------------| | azure_map / map | azureMap | --category, --size |
| Alias | PBIR Type | Bind Options | |--------------------|------------------------------|-----------------------------------------------| | action_button | actionButton | (no data binding) | | image | image | (no data binding) | | shape | shape | (no data binding) | | textbox | textbox | (no data binding) | | page_navigator | pageNavigator | (no data binding) |
By default, every write command automatically syncs Power BI Desktop. When adding or binding many visuals in sequence, Desktop reloads after each one.
Use --no-sync on the visual command group to batch all changes, then call pbi report reload once at the end:
bash# Suppress sync while building visuals pbi visual --no-sync add --page overview --type card --name rev_card pbi visual --no-sync bind rev_card --page overview --field "Sales[Total Revenue]" pbi visual --no-sync add --page overview --type bar --name sales_bar pbi visual --no-sync bind sales_bar --page overview --category "Product[Category]" --value "Sales[Revenue]" # Single reload when all visuals are done pbi report reload
All commands support --json for agent consumption:
bashpbi --json visual list --page overview pbi --json visual get vis1 --page overview pbi --json visual where --page overview --type barChart
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,634 | 3,826 | -72% | 1 | 1 | 0% | 2,924 | 3,464 | +18% | 0 | 0 | — |
case-02 | fail→pass | 22,043 | 4,403 | -80% | 1 | 1 | 0% | 4,697 | 3,600 | -23% | 0 | 0 | — |
case-03 | fail→pass | 8,922 | 4,017 | -55% | 1 | 1 | 0% | 1,912 | 3,480 | +82% | 0 | 0 | — |
case-04 | fail→pass | 13,894 | 2,883 | -79% | 1 | 1 | 0% | 2,930 | 3,282 | +12% | 0 | 0 | — |
case-05 | fail→pass | 12,233 | 2,098 | -83% | 1 | 1 | 0% | 2,307 | 3,091 | +34% | 0 | 0 | — |
case-06 | fail→pass | 12,565 | 2,494 | -80% | 1 | 1 | 0% | 2,167 | 3,070 | +42% | 0 | 0 | — |
case-07 | pass→pass | 7,976 | 2,570 | -68% | 1 | 1 | 0% | 1,598 | 3,159 | +98% | 0 | 0 | — |
case-08 | pass→pass | 9,763 | 14,321 | +47% | 1 | 1 | 0% | 1,903 | 3,078 | +62% | 0 | 0 | — |
case-09 | pass→pass | 13,074 | 2,879 | -78% | 1 | 1 | 0% | 2,757 | 3,127 | +13% | 0 | 0 | — |
case-10 | fail→pass | 6,848 | 3,294 | -52% | 1 | 1 | 0% | 1,173 | 3,176 | +171% | 0 | 0 | — |
case-11 | pass→pass | 9,528 | 2,376 | -75% | 1 | 1 | 0% | 1,689 | 3,027 | +79% | 0 | 0 | — |
case-12 | pass→pass | 8,887 | 2,588 | -71% | 1 | 1 | 0% | 2,001 | 3,066 | +53% | 0 | 0 | — |
case-13 | fail→pass | 10,026 | 3,529 | -65% | 1 | 1 | 0% | 1,721 | 3,148 | +83% | 0 | 0 | — |
case-14 | fail→pass | 12,716 | 2,213 | -83% | 1 | 1 | 0% | 2,262 | 3,060 | +35% | 0 | 0 | — |
case-15 | fail→pass | 3,969 | 2,757 | -31% | 1 | 1 | 0% | 772 | 3,038 | +294% | 0 | 0 | — |
case-16 | fail→pass | 12,557 | 1,964 | -84% | 1 | 1 | 0% | 2,093 | 2,957 | +41% | 0 | 0 | — |
case-17 | pass→pass | 9,519 | 2,836 | -70% | 1 | 1 | 0% | 1,926 | 3,093 | +61% | 0 | 0 | — |
case-18 | fail→pass | 13,801 | 2,794 | -80% | 1 | 1 | 0% | 2,261 | 3,049 | +35% | 0 | 0 | — |
case-19 | pass→pass | 10,115 | 2,879 | -72% | 1 | 1 | 0% | 1,819 | 3,107 | +71% | 0 | 0 | — |
case-20 | fail→fail | 11,405 | 8,660 | -24% | 1 | 1 | 0% | 1,995 | 4,174 | +109% | 0 | 0 | — |
case-21 | pass→pass | 12,470 | 6,250 | -50% | 1 | 1 | 0% | 2,107 | 3,660 | +74% | 0 | 0 | — |
case-22 | fail→pass | 24,929 | 3,722 | -85% | 1 | 1 | 0% | 2,010 | 3,173 | +58% | 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 +59 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.