deneb-visuals
Deneb visual creation, Vega/Vega-Lite spec authoring, and Deneb best practices for PBIR reports. Automatically invoke whenever the user mentions "Deneb" in any…
Author, validate, and test Power Query M expressions in semantic model partitions. Automatically invoke when the user mentions "Power Query", "M code", "M expression", "partition expression", "query folding", or asks to "write Power Query", "fix Power Query", "test a partition",
$ npx -y skills add data-goblin/power-bi-agentic-development --skill power-query --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/power-queryContext preview
The summary Claude sees to decide when to auto-load this skill.
Author, validate, and test Power Query M expressions in semantic model partitions. Automatically invoke when the user mentions "Power Query", "M code", "M expression", "partition expression", "query folding", or asks to "write Power Query", "fix Power Query", "test a partition",
name: power-query description: Author, validate, and test Power Query M expressions in semantic model partitions. Automatically invoke when the user mentions "Power Query", "M code", "M expression", "partition expression", "query folding", or asks to "write Power Query", "fix Power Query", "test a partition", "preview partition data", "debug Power Query step", "optimize Power Query".
Author, validate, and test Power Query M expressions in semantic model import partitions. Covers writing correct M code, preserving query folding, validating expressions, and testing them by executing against real data sources.
Each import table in a semantic model has a partition with an M expression defining what data gets loaded during refresh. The expression typically connects to a data source, navigates to a table/view, and applies transformations.
let
Source = Sql.Database(#"SqlEndpoint", #"Database"),
Data = Source{[Schema="dbo", Item="Orders"]}[Data],
#"Removed Columns" = Table.RemoveColumns(Data, {"InternalId"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Columns", {{"Amount", Currency.Type}})
in
#"Changed Type"Key elements:
# Get partition expression from TMDL via fab fab get "<Workspace>.Workspace/<Model>.SemanticModel" -f \ -q "definition.parts[?path=='definition/tables/<Table>.tmdl'].payload" # Get shared M parameters fab get "<Workspace>.Workspace/<Model>.SemanticModel" -f \ -q "definition.parts[?path=='definition/expressions.tmdl'].payload"
Query folding is the most important performance concept. The M engine translates compatible steps into native data source queries (e.g., SQL). When folding breaks, subsequent steps run in the mashup engine, pulling all data into memory first.
**Steps that typically fold** (for SQL sources):
**Steps that may or may not fold** (source-dependent):
**Steps that break folding:**
**Best practice:** Apply folding-compatible steps (filter, select, type) early; add custom columns and M-only transforms after all foldable work is done.
Remove unused columns and filter rows as early as possible:
let
Source = Sql.Database(SqlEndpoint, Database),
Data = Source{[Schema="dbo", Item="Orders"]}[Data],
// Filter and select BEFORE any custom transforms
#"Filtered" = Table.SelectRows(Data, each [Status] <> "Cancelled"),
#"Selected" = Table.SelectColumns(#"Filtered", {"OrderId", "Date", "Amount", "CustomerId"})
in
#"Selected"These steps fold to SQL: `SELECT OrderId, Date, Amount, CustomerId FROM dbo.Orders WHERE Status <> 'Cancelled'`
Two approaches to validate that an M expression is syntactically correct and produces expected results:
Test the expression by running it against real data. This validates syntax, data source connectivity, and transformation correctness in one step.
The full workflow, run by the bundled `examples/execute_m.py`:
1. Create or reuse a runner dataflow in the workspace 2. Bind the data source connection to the runner 3. Wrap the expression in a section document, inline parameters 4. Execute via `POST /v1/workspaces/{wsId}/dataflows/{dfId}/executeQuery` 5. Parse the Arrow response to verify data
MASHUP='section Section1;
shared SqlEndpoint = "myserver.database.windows.net";
shared Database = "MyDB";
shared Result = let
Source = Sql.Database(SqlEndpoint, Database),
Data = Table.FirstN(Source{[Schema="dbo",Item="Orders"]}[Data], 10)
in Data;'
curl -s -o result.bin -X POST ".../executeQuery" \
-H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" \
-d "$(jq -n --arg m "$MASHUP" '{queryName:"Result",customMashupDocument:$m}')"See **`references/validation.md`** for step-by-step instructions and error handling.
Write the expression back to the model; Analysis Services validates the M syntax on save. This doesn't execute the query but catches
Power BI AI skills and Power BI agents for Claude Code and GitHub Copilot: a plugin marketplace of Power BI skills, subagents, and hooks for semantic models, DAX, TMDL, reports, and AI dashboards. Includes Microsoft Fabric skills and Fabric agents. Weekly updates.
Repo: data-goblin/power-bi-agentic-development
Deneb visual creation, Vega/Vega-Lite spec authoring, and Deneb best practices for PBIR reports. Automatically invoke whenever the user mentions "Deneb" in any…
Power BI custom visual (.pbiviz) development with the pbiviz toolchain and its MCP server. Automatically invoke when the user mentions "custom visual",…
Python visual creation and matplotlib/seaborn patterns for PBIR reports. Automatically invoke when the user mentions "Python visual", "matplotlib in Power BI",…
R visual creation and ggplot2 patterns for PBIR reports. Automatically invoke when the user mentions "R visual", "ggplot2", "ggplot in Power BI", or asks to…
SVG generation via DAX measures and extension measures with ImageUrl data category for inline visualizations in PBIR reports. Automatically invoke when the…
Execute arbitrary Python or PySpark code on Fabric Spark compute without creating a notebook artifact; ephemeral Livy sessions with full Delta table access.…