power-bi-dax-optimization

Analyzes and rewrites Power BI DAX formulas for performance, readability, and maintainability.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/miyake-san/sogo-agent-platform --skill power-bi-dax-optimization-miyake-san
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: power-bi-dax-optimization
Source: https://github.com/miyake-san/sogo-agent-platform/tree/main/skills/domain/power-bi-dax-optimization
Command: npx skills add https://github.com/miyake-san/sogo-agent-platform --skill power-bi-dax-optimization-miyake-san

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? DAX formulas in Power BI reports often suffer from slow query performance, poor readability, and violations of best practices, making reports sluggish and hard to maintain. This Skill provides a structured expert review that diagnoses issues and produces an optimized rewrite with explanations. ## Core Features & Use Cases - Performance Analysis: Identifies expensive operations, repeated expressions, inefficient context transitions, and suboptimal function choices such as COUNT versus COUNTROWS. - Structured Optimization Workflow: Follows a four-step process covering current formula analysis, optimization strategy, the rewritten formula, and justification of every change. - Best Practices Enforcement: Applies VAR usage, DIVIDE instead of the division operator, SELECTEDVALUE instead of VALUES, and proper BLANK handling. - Use Case: A report developer has a year-over-year sales growth measure that renders slowly when filtered by multiple dimensions. Submitting the formula returns an optimized version using variables and a single PARALLELPERIOD calculation, plus an explanation of the expected performance impact. ## Quick Start Optimize this DAX formula for performance and readability, explaining each change: paste your measure definition and describe its business purpose and any performance issues.

Frequently Asked Questions about power-bi-dax-optimization

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?

Provide the DAX formula along with its business purpose and the performance issue you observe. The analysis identifies expensive operations and repeated expressions, then rewrites the measure using variables, efficient functions like COUNTROWS and DIVIDE, and reduced context transitions.

What DAX best practices does the optimization check?

The review verifies proper VAR usage for repeated calculations, DIVIDE instead of the division operator, SELECTEDVALUE instead of VALUES, correct column versus measure references, and proper BLANK handling without unnecessary conversions.

Why is my DAX formula slow when filtering by multiple dimensions?

Slowness under multiple filters usually comes from repeated context transitions in iterator functions or recalculating the same expression several times. Storing intermediate results in variables and simplifying filter logic typically resolves this.

What information should I provide to get a DAX formula optimized?

Supply the DAX formula itself, the business purpose of the calculation, relevant data model relationships, any current performance concerns, and your optimization goals such as speed, readability, or error handling.

Can this help with DAX error handling and edge cases?

Yes, the optimization includes defensive patterns such as replacing division operators with DIVIDE, preserving BLANK behavior intentionally, and validating inputs to handle edge cases without changing the measure's intended results.