dax-optimisation

Diagnose and optimize slow DAX queries in Power BI semantic models using trace analysis.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Slow DAX measures and queries degrade Power BI report performance, and identifying whether the bottleneck lies in the formula engine, storage engine, query structure, or model design requires deep engine knowledge and systematic trace analysis. ## Core Features & Use Cases - Tiered optimization framework: Applies 21 DAX rewrite patterns (Tier 1), 4 query structure patterns (Tier 2), 9 model patterns (Tier 3), and 2 Direct Lake patterns (Tier 4) with escalating autonomy and approval gates. - Trace-driven diagnostics: Reads server timing traces (FE/SE split, xmSQL, callbacks, fusion, parallelism) to route optimization decisions via a decision guide. - Baseline and equivalence protocol: Establishes warm-cache baselines with median-of-3 runs and validates semantic equivalence after every rewrite. - Use Case: A report visual takes 8 seconds to render; the skill captures a trace, detects CallbackDataID events from an IF inside SUMX, rewrites the measure per pattern DAX007, and confirms a faster, semantically identical result. ## Quick Start Ask the agent to optimize a slow DAX measure in your semantic model and it will capture a baseline trace, apply matching optimization patterns, and verify the results.

Frequently Asked Questions about dax-optimisation

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

FAQPage Schema
How do I optimize a slow DAX measure in Power BI?▼

Capture a server timing trace of the query, establish a warm-cache baseline, then apply matching Tier 1 patterns such as replacing FILTER table arguments with column predicates or caching repeated expressions in variables. Validate semantic equivalence after each change.

What tools can capture DAX server timings and traces?▼

Trace capture options include the Tabular Editor CLI te query command, DAX Studio Server Timings, the TOM Trace API via PowerShell, Fabric Workspace Monitoring KQL queries, and the Power BI Modeling MCP. Each provides FE/SE duration splits and xmSQL events.

What is the difference between formula engine and storage engine in DAX?▼

The formula engine handles all DAX logic single-threaded and is the bottleneck in most slow queries. The storage engine reads compressed VertiPaq data multi-threaded but supports only basic aggregations and joins. Optimization means pushing work to the SE and eliminating callbacks.

Why is my DAX query slow even with clean xmSQL?▼

Few SE queries with high duration and parallelism near 1.0 indicate a data layout problem, not a DAX problem. Check segment sizing, column cardinality, and compression; for Direct Lake, apply V-Ordering and optimize Parquet rowgroup sizes.

Can DAX optimization change my query results?▼

Tier 1 rewrites preserve semantics by modifying only measure definitions while keeping EVALUATE and grouping identical. Tier 2 and above changes alter output shape or model structure, so they require explicit user approval before applying.

Does a DAX trace show dynamic format string costs?▼

No. Dynamic format strings evaluate once per rendered cell and never appear in query traces. A format string referencing its own measure can roughly double visual render time; test by swapping to a static format string and re-timing the visual.