power-query

Author, validate, and test Power Query M expressions in semantic model partitions.

6|3|Updated Jul 4, 2026
One-click install
npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill power-query-insightfulanalytics
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: power-query
Source: https://github.com/InsightfulAnalytics/PBI_Agentic_Dev/tree/main/plugins/semantic-models/skills/power-query
Command: npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill power-query-insightfulanalytics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyarrow, and includes references (resource) and scripts (resource) components.

What problem does it solve? Writing Power Query M expressions for semantic model partitions is error-prone: syntax mistakes, broken query folding, and wrong column references often surface only during refresh. This Skill lets you author, validate, and test M expressions against real data sources before deploying them to a model. ## Core Features & Use Cases - M Expression Authoring: Write partition expressions with correct query folding order, early column pruning, row filtering, and explicit type handling. - Validation & Testing: Execute expressions via the Fabric executeQuery API against real data, or save to the model via XMLA/TOM for quick syntax checks. - Step-by-Step Debugging: Preview data at any step in the let...in chain by truncating the expression, with row limits via Table.FirstN. - Use Case: You need to add a filtered import partition for an Orders table. Generate the M expression, execute it against the SQL source to verify columns and types, then deploy it to the semantic model with confidence that folding is preserved. ## Quick Start Write and test a Power Query M expression for the Orders table partition in my semantic model, filtering out cancelled rows and previewing the first 100 rows.

Frequently Asked Questions about power-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a Power Query M expression before deploying it?▼

Execute the expression via the Fabric executeQuery API by wrapping it in a section document with inlined shared parameters and posting it to a runner dataflow. This validates syntax, connectivity, and data correctness in one step. Alternatively, save the partition via XMLA/TOM for a quick syntax-only check.

What is query folding in Power Query and why does it matter?▼

Query folding translates M steps into native data source queries like SQL, so the source does the heavy lifting. When folding breaks, the mashup engine pulls all data into memory, causing slow refreshes or timeouts on large tables. Apply foldable steps like filters and column selection first.

Which Power Query steps break query folding on SQL Server?▼

Steps like Table.Buffer, Table.AddIndexColumn, Table.LastN, Table.Transpose, and custom lambda functions break folding. Once folding breaks, all subsequent steps run locally in the mashup engine. Use Table.StopFolding instead of Table.Buffer when you only need to stop folding.

How do I preview data at a specific step in a Power Query expression?▼

Change the in clause of the let...in expression to reference the step name you want to inspect, such as in #"Filtered". Add Table.FirstN around the final step to limit rows for large tables, then execute via the API to see columns, types, and sample values.

Why does my Power Query execution fail with a credentials error?▼

The error 'Credentials are required to connect to the SQL source' means the data source connection is not bound to the runner dataflow. Bind the connection via the updateDefinition API call before executing the mashup document.

Can Power Query handle incremental refresh partitions?▼

Yes, incremental refresh partitions use RangeStart and RangeEnd parameters in a Table.SelectRows filter on a date column. When testing, inline concrete date values for these parameters so the expression can execute outside the refresh context.