/powerbi-fabric:pbi-query <description of data transformation> [--source sql|dataverse|rest|excel|csv|sharepoint|odata]from powerbi-fabric
Generates Power Query M code for data transformation or source connection. Supports SQL, Dataverse, REST, Excel, CSV, SharePoint, and OData sources.
Ships in powerbi-fabric. Installing the plugin adds it to Claude Code.
Generate complete Power Query M code based on the user's description.
--source flag is provided, use the specified source connector. Otherwise, infer from the description.skills/powerbi-analytics/references/power-query-m.md for syntax and patterns.skills/powerbi-analytics/examples/power-query-transformations.md for code templates.| Flag | Connector | M Function |
|---|---|---|
sql | SQL Server / Azure SQL | Sql.Database() |
dataverse | Dataverse / Dynamics 365 | CommonDataService.Database() |
rest | REST API | Web.Contents() + Json.Document() |
excel | Excel workbook | Excel.Workbook() |
csv | CSV/Text file | Csv.Document() |
sharepoint | SharePoint files | SharePoint.Files() |
odata | OData feed | OData.Feed() |
// ============================================
// Query: [Query Name]
// Description: [What this query does]
// Source: [Data source type]
// ============================================
let
// Step 1: Connect to source
Source = ...,
// Step 2: Transform
...
// Final: Type columns
TypedResult = Table.TransformColumnTypes(...)
in
TypedResult
Table.TransformColumnTypes as the final step.ServerName, DatabaseName) for connection strings instead of hard-coded values.Web.Contents, always use RelativePath and Query parameters for proper credential handling.List.Generate to fetch all pages.try/otherwise) for operations that might fail on individual rows.~$ prefix).What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
19 commands in this plugin
/pbi-calc-groupAuthor a calculation group (time intelligence, currency, or format switching) as TMDL, collapsing repeated measure variants into reusable calculation items./pbi-dashboard-createCreate Power BI dashboards in Fabric with deterministic setup and verification checks./pbi-dataflowScaffold a Fabric Dataflow Gen2 Power Query M definition for common source types with publishing guidancenpx claudepluginhub thelobbi/claude-m --plugin powerbi-fabricOther plugins' commands for the same job