power-query

Solid

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".

Data & Documents 654 stars 103 forks Updated 4 days ago GPL-3.0

Install

View on GitHub

Quality Score: 92/100

Stars 20%
94
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Power Query for Semantic Models 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. ## Partition Expressions 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. ### Structure of a Partition Expression ``` 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: - **Parameters**: `#"SqlEndpoint"`, `#"Database"` are shared M parameters defined at the model level - **Navigation**: `Source{[Schema="dbo", Item="Orders"]}[Data]` navigates to a specific table - **Steps**: Each step is a named variable in the `let...in` chain - **Quoted identifiers**: Step names with spaces use `#"Step Name"` syntax ### Extracting Expressions ```bash # 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/<...

Details

Author
data-goblin
Repository
data-goblin/power-bi-agentic-development
Created
4 months ago
Last Updated
4 days ago
Language
C#
License
GPL-3.0

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

powerbi-modeling

Power BI semantic models - DAX measures, star schemas, relationships, RLS, and performance tuning via MCP. Use when creating data models, writing DAX, or configuring table relationships in Power BI.

1 Updated today
bg-szy
AI & Automation Solid

powerbi-modeling

Power BI semantic modeling assistant for building optimized data models. Use when working with Power BI semantic models, creating measures, designing star schemas, configuring relationships, implementing RLS, or optimizing model performance. Triggers on queries about DAX calculations, table relationships, dimension/fact table design, naming conventions, model documentation, cardinality, cross-filter direction, calculation groups, and data model best practices. Always connects to the active model first using power-bi-modeling MCP tools to understand the data structure before providing guidance.

34,233 Updated today
github
AI & Automation Solid

review-semantic-model

Review, audit, and validate Power BI semantic models against quality, performance, and best practice standards. Automatically invoke when the user asks to "review a semantic model", "audit a semantic model", "check model quality", "optimize my model", "validate model design", "check AI readiness", "prepare model for Copilot", or mentions model validation or quality assessment.

654 Updated 4 days ago
data-goblin
AI & Automation Solid

bpa-rules

Interactive BPA rule generation for Power BI semantic models; guided discovery, model investigation, and expert rule authoring. Automatically invoke when the user mentions "BPA rule", "Best Practice Analyzer", or asks to "create a BPA rule", "audit BPA rules", "recommend BPA rules", "set up BPA for my team", "check model for best practices", "validate BPA rules", "improve a BPA expression".

654 Updated 4 days ago
data-goblin
Data & Documents Solid

c-sharp-scripting

Writing and executing C# scripts and macros against Power BI semantic models using Tabular Editor 2/3. Automatically invoke when the user mentions "C# script", "Tabular Editor script", "TOM scripting", "MacroActions.json", "XMLA", or asks to "automate model changes", "bulk update measures", "create calculation groups", "write a macro", "format DAX expressions", "manage model metadata".

654 Updated 4 days ago
data-goblin