powerbi-create-pbi-report
Skill3 starsChanged 7 months agoMITView on GitHub
Step-by-step workflow for creating complete Power BI reports from scratch using pbir CLI. Covers model discovery, report creation, page layout, theme setup, visual placement, field binding, filtering, formatting, validation, and publishing. Automatically invoke when the user asks to "create a new report", "build a report from scratch", "make a dashboard", "set up a report with KPIs", "create an executive dashboard", "add pages and visuals to a new report".
- Installs packages
In this repository58 other files it gives its agents.
- powerbi-audit-tenant-settingsSkill
- powerbi-bpa-rulesSkill
- powerbi-connect-pbidSkill
- powerbi-connectSkill
- powerbi-c-sharp-scriptingSkill
- powerbi-custom-visualsSkill
- powerbi-cyber-securitySkill
- powerbi-data-catalog-lineageSkill
- powerbi-data-governance-traceabilitySkill
- powerbi-data-transformationSkill
- powerbi-dax-masterySkill
- powerbi-dax-performanceSkill
- powerbi-daxSkill
- powerbi-deneb-visualsSkill
- powerbi-doctorSkill
- powerbi-duckdb-lakehouseSkill
- powerbi-fabric-appsSkill
- powerbi-fabric-app-templatesSkill
- powerbi-fabric-capacitySkill
- powerbi-fabric-cliSkill
- powerbi-fabric-pipelinesSkill
- powerbi-fabricSkill
- powerbi-lineage-analysisSkill
- powerbi-measure-glossarySkill
- powerbi-medallion-architectureSkill
- powerbi-modelSkill
- powerbi-modifying-theme-jsonSkill
- powerbi-paginated-reportsSkill
- powerbi-pbi-cliSkill
- powerbi-pbip-formatSkill
- powerbi-pbir-cliSkill
- powerbi-pbir-format-enhancedSkill
- powerbi-performance-scaleSkill
- powerbi-power-querySkill
- powerbi-project-managementSkill
- powerbi-python-visualsSkill
- powerbi-refresh-semantic-modelSkill
- powerbi-report-authoringSkill
- powerbi-report-conversionSkill
- powerbi-report-designSkill
- powerbi-reportSkill
- powerbi-report-structureSkill
- powerbi-report-themingSkill
- powerbi-review-reportSkill
- powerbi-review-semantic-modelSkill
- powerbi-r-visualsSkill
- powerbi-security-rlsSkill
- powerbi-source-integrationSkill
- powerbi-spark-livySkill
- powerbi-standardize-naming-conventionsSkill
- powerbi-star-schema-modelingSkill
- powerbi-svg-visualsSkill
- powerbi-te2-cliSkill
- powerbi-te-cliSkill
- powerbi-te-docsSkill
- powerbi-testing-validationSkill
- powerbi-time-series-dataSkill
- powerbi-tmdlSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Create and scaffold Power BI reports using pbir CLI.
- Very specific: line 20
Always create reports inside a named project folder (e.g., sales-dashboard/Sales.Report)
- Very specific: line 21
Run pbir validate after every mutation
- Distinctive: line 29
Consider missing semantic model objects -- not just what the user asks for, but targets (1 year prior), baselines (avg for period), or …
- Distinctive: line 30
Create a project folder and report (default format is PBIP):
- Very specific: line 39
Only if the user requests a custom theme: pbir theme apply-template "Name.Report" template-name (the sqlbi theme is already included by …
- Very specific: line 43
Add visuals (the page already has a textbox for the title): pbir add visual kpi "Name.Report/Overview.Page" --title "Revenue"
- Very specific: line 53
Before creating visuals, explore the semantic model to understand the domain.
- Distinctive: line 79
If the user provides a workspace location, create the report locally in a project folder, then publish.
- Distinctive: line 83
Create a project folder first, then the report inside it.
- Distinctive: line 132
Before binding any visual to a measure, verify it exists:
- Very specific: line 143
Every --field, --value, --indicator reference points to a real measure or column in the TMDL
- Very specific: line 147
After adding measures directly to a TMDL file (without pbir connect): close and reopen the .pbip file in Power BI Desktop.
- Very specific: line 149
Check actual page dimensions first -- do not assume 1280x720.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Creating Power BI Reports
Create and scaffold Power BI reports using pbir CLI. Install with uv tool install pbir-cli or pip install pbir-cli. Load the pbir-cli and pbi-report-design skills alongside this one.
Vague or Underspecified Prompts
When the user's request lacks specific measures, audience context, structural preferences, or formatting direction (e.g., "make me a dashboard", "create something with KPIs"), consult references/vague-prompts.md before proceeding. Close the gap between intent and specification with targeted questions; then apply sensible defaults (sqlbi theme, executive dashboard pattern, model-driven KPI selection) for anything the user can't or won't specify.
Rules
- Visuals must not overlap one another
- Favor theme changes over visual overrides for static formatting
- Favor extension measures with theme colors (like "bad") for conditional formatting
- Always create reports inside a named project folder (e.g.,
sales-dashboard/Sales.Report) - Run
pbir validateafter every mutation - New reports already include the sqlbi theme -- do NOT run
pbir theme apply-templateunless the user explicitly asks for a different theme - New reports already include a default Page 1 with a textbox visual for the page title at position (20,20) with height 90 -- do NOT add a new textbox; rename the existing page with
pbir pages renameinstead. Place all visuals at y:120 or below to avoid overlapping the title textbox.
Quick Reference
- Get the workspace and semantic model from the user. If the user wants to connect to Power BI Desktop or create a report with source data, explain that a published semantic model in Fabric or Power BI is required first.
- Analyze the user's requirements. Consider missing information -- charts, filters, formatting, analyses. Use
AskUserQuestionif something is unclear. - Consider missing semantic model objects -- not just what the user asks for, but targets (1 year prior), baselines (avg for period), or trend aggregations (14-day rolling) that enrich visuals.
Create a project folder and report (default format is PBIP):
mkdir -p /path/to/report-name cd /path/to/report-name pbir new report "Name.Report" -c "Workspace/Model.SemanticModel"- Rename the default page (do NOT add a new page unless the report needs multiple pages):
pbir pages rename "Name.Report/Page 1.Page" "Overview" - Only if the user requests a custom theme:
pbir theme apply-template "Name.Report" template-name(the sqlbi theme is already included by default) - Discover model fields:
pbir model "Name.Report" -d - Query field values for filters or formatting:
pbir model "Name.Report" -q "EVALUATE VALUES('Table'[Column])" - Inspect field data types:
pbir model "Name.Report" -d -t Table - Add visuals (the page already has a textbox for the title):
pbir add visual kpi "Name.Report/Overview.Page" --title "Revenue" - Validate:
pbir validate "Name.Report" - Publish:
pbir publish "Name.Report" "Workspace.Workspace/Name.Report" - Open in Fabric after publish:
pbir publish "Name.Report" "Workspace.Workspace/Name.Report" -o - Or open locally in Power BI Desktop:
pbir open "Name.Report"
Step-by-Step Process
Step 1: Understand the Business Process
Before creating visuals, explore the semantic model to understand the domain. Use pbir model "Report.Report" -d to inspect tables, columns, measures, and hierarchies. Consider:
- What domain does this model cover? (sales, finance, operations, logistics, etc.)
- What KPIs and measures matter most?
- What dimensions and hierarchies exist for slicing data?
- What time granularity makes sense? (daily, weekly, monthly, quarterly)
Present a concrete proposal via AskUserQuestion before building anything. The proposal should include:
- Which KPI cards to show and what measures they display
- What trend chart(s) to include and at what time granularity
- Which categorical breakdowns are most insightful
- What detail table/matrix to provide and with what hierarchies
- How filters should scope the data
Iterate on the design before executing -- revising a plan is cheaper than rebuilding visuals.
Step 2: Identify Location and Connection
Determine where to create the report and what model it connects to. Use AskUserQuestion to understand the report's purpose, audience, and what decisions it should support.
pbir model # List all known reports/models
pbir connect MyWorkspace MyReport # Set active connectionIf the user provides a workspace location, create the report locally in a project folder, then publish.
Step 3: Create the Report
Create a project folder first, then the report inside it. Default format is PBIP.
mkdir -p sales-dashboard && cd sales-dashboard
pbir new report "Sales.Report" -c "MyWorkspace/Sales.SemanticModel"The resulting structure:
sales-dashboard/
Sales.Report/
definition/
pages/
report.json
StaticResources/
definition.pbir
Sales.pbipStep 4: Rename Default Page and Add More Pages
The report comes with a default "Page 1" that already has a textbox for the page title. Rename it rather than creating a new page. Only add additional pages if needed.
pbir pages rename "Sales.Report/Page 1.Page" "Overview" # Rename default page
pbir add page "Sales.Report/Detail.Page" -n "Detail" # Add extra pages only if needed
pbir pages active-page "Sales.Report" "Overview"Step 5: Configure Theme (only if user requests)
The sqlbi theme is already included by default. Only modify the theme if the user explicitly asks for a different theme or custom colors.
# Only if user wants a different theme:
pbir theme apply-template "Sales.Report" custom-theme
# Or to customize specific colors:
pbir theme set-colors "Sales.Report" --good "#00B050" --bad "#FF0000"
pbir theme set-text-classes "Sales.Report" title --font-size 16
pbir theme set-formatting "Sales.Report" "card.*.border.radius" --value 8Step 6: Add Visuals to Pages
Prerequisite: Measures must exist in the semantic model before binding.
pbir visuals bind records that a measure should exist — it does NOT create it. If the measure is missing from the TMDL, every visual bound to it will show a field error in Desktop.
Before binding any visual to a measure, verify it exists:
# Option A: inspect TMDL directly
# Look for `measure '...' =` lines in SemanticModel/definition/tables/*.tmdl
# Option B: query via pbir model
pbir model "Report.Report" -dChecklist before opening Desktop:
- Every
--field,--value,--indicatorreference points to a real measure or column in the TMDL - Table names match exactly (case-sensitive in PBIR):
"Fact_Sales"≠"fact_sales" - Measure names match exactly:
"Total Revenue"≠"Total_Revenue"
After adding measures directly to a TMDL file (without pbir connect): close and reopen the .pbip file in Power BI Desktop. Desktop only reads TMDL on file open — it does not hot-reload disk changes.
Check actual page dimensions first -- do not assume 1280x720. Use pbir pages json "Report.Report/Page.Page" to verify. The object model validates that visuals fit within page bounds.
Fill the canvas with a purposeful visual hierarchy. Standard composition for a 1280x720 page:
- Row 1 (y: 20-160): KPI visuals -- 2-3
kpivisuals showing headline metrics with targets and trend lines - Row 2 (y: 180-460): Trend + Breakdown -- Line/area chart (~60% width) + bar/column chart (~40% width)
- Row 3 (y: 480-700): Detail table/matrix -- Full-width
tableExormatrixwith hierarchies and conditional formatting
For a complete layout example with exact coordinates, spacing verification, and visual commands, consult references/layout-example.md.
Key principles:
- Consistent spacing: Calculate positions from
(margin, gap, page_width, page_height). For 1280x720 with margin=24, gap=16, usable width = 1232. Verify arithmetic before placing visuals. - No redundant titles: Page title = subject ("Order Lines"), visual titles = differentiator ("by Key Account", "Monthly Trend"). Hide subtitles:
pbir visuals subtitle "path" --no-show - Sorting: Charts auto-sort descending by first measure. After
pbir visuals bind, set sort explicitly:pbir visuals sort "path" -f "Table.Measure" -d Descending
Step 7: Add Filters
pbir add filter Date Year -r "Sales.Report" --values 2025
pbir add filter Geography Region -r "Sales.Report"
pbir add filter Products Category -p "Sales.Report/Detail.Page"Step 8: Format Visuals
Most formatting should come from the theme (Step 5). Apply bespoke formatting only for genuinely one-off cases.
# Bulk formatting via glob (requires -f for glob patterns)
pbir set "Sales.Report/**/*.Visual.title.show" --value true -f
pbir set "Sales.Report/**/*.Visual.border.show" --value true -f
# Individual visual formatting
pbir visuals title "Sales.Report/Overview.Page/Revenue.Visual" --fontSize 14 --bold
pbir visuals background "Sales.Report/Overview.Page/Revenue.Visual" --color "#F8F9FA"Step 9: Validate
pbir validate "Sales.Report"
pbir tree "Sales.Report" -vStep 10: Publish or Open
pbir publish "Sales.Report" "MyWorkspace.Workspace/Sales.Report" # Publish
pbir publish "Sales.Report" "MyWorkspace.Workspace/Sales.Report" -o # Publish and open in browser
pbir open "Sales.Report" # Open in Power BI DesktopCommon Report Patterns
Executive Dashboard
- 2-3 KPI cards at top (revenue, orders, margin)
- 1 trend line/area chart (monthly if yearly filter, daily/weekly if monthly)
- 1-2 breakdown charts (bar/column) by key categories
- 1 detail table or matrix with hierarchies and conditional formatting
- Page size: 1280x720 (16:9)
Detailed Analysis
- Slicer bar at top (date range, category filters)
- Large table or matrix as main content with conditional formatting
- Supporting KPI cards for context
- Page size: 1280x720 or 1920x1080
Tooltip Pages
- Small page (320x240 or similar)
- 2-3 focused visuals
- Set via
pbir pages type "path" --type tooltip
Reference Files
references/vague-prompts.md-- Handling underspecified prompts: targeted questions, sensible defaults, propose-before-building workflowreferences/layout-example.md-- Complete layout with coordinates, spacing verification, time granularity table
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

