create-pbi-report
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".
data-goblin · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add data-goblin/power-bi-agentic-development --skill create-pbi-report技能说明
name: create-pbi-report description: 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".
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. -
Assemble a design brief (audience, purpose, decision questions, page list with per-page intent, committed design identity, delivery target); get user approval before building; see
references/design-brief.md. -
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" --to "Overview" -f -
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" -
Configure query reduction (slicers + heavy visuals): see
references/interactivity.md -
Wire cross-filter overrides and page navigation: see
references/interactivity.md -
Add filters and slicers; configure slicer sync and reset: see
references/interactivity.md -
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 1b: Assemble and Lock the Design Brief
Consolidate the Step 1 exploration and any vague-prompt findings into one design brief. This is not a second round of requirements gathering; it freezes what is already known into a single spec the build steps execute against. The brief names the audience, the purpose, the 2-5 decision questions a viewer must answer, a page list where each page carries one stated intent, the committed design identity (tone plus signature), and the delivery target. See references/design-brief.md for the copy-able template and how to fill each field.
Present the brief once via AskUserQuestion for explicit "yes" or "change X" approval. On approval, treat it as frozen: the build steps run against it without re-liti