- Home
- Skills
- Data & Databases
- Power BI DAX Review & Optimization
More screenshots
Works with the AI Agents you already use
Power BI DAX Review & Optimization
Review Power BI DAX measures for incorrect totals, filter-context mistakes, and optimization opportunities, with clear recommendations and a validation plan.
$29
Power BI DAX Review & Optimization
Example session with this skill installed
Review this Power BI DAX measure: Margin % = AVERAGE(Sales[MarginPct]). Sales is an Import table with one row per sales line; Amount and Profit are additive monetary columns. Product has an active one-to-many relationship to Sales. Margin must mean total profit divided by total net revenue, including totals. Zero revenue should return BLANK. Synthetic rows: A has Amount 100, Profit 10, MarginPct 0.10; B has Amount 900, Profit 270, MarginPct 0.30. Explain any correctness issue, propose a correction, and give a validation plan. No DAX runtime is connected.
- Read your context and instructions
- Compiled the power bi dax
Worked review: weighted margin
Supplied model and business rule
In this Import model, Sales has one row per sales line; Amount and Profit are additive monetary columns. Product has a one-to-many active relationship to Sales. The user defines margin as total profit / total revenue, including in subtotals. Amount is net revenue; returns are included. A zero net revenue result should be BLANK.
Current measure
Margin % = AVERAGE(Sales[MarginPct])
Synthetic fixture (not customer data):
| Product | Amount | Profit | MarginPct |
|---|---|---|---|
| A | 100 | 10 | 0.10 |
| B | 900 | 270 | 0.30 |
Expected grand total: 280 / 1000 = 28%. The original averages the line percentages to 20%. This is a supported P1 correctness finding under the stated business rule, not evidence of a performance defect.
Proposed measure, using only the supplied columns:
Margin % = DIVIDE(SUM(Sales[Profit]), SUM(Sales[Amount]))
Preserve percentage formatting. If equivalent approved base measures exist, reuse them. Do not infer Amount/Profit columns from a percentage-only input.
Model-scoped comparison query
For DAX Query View or DAX Studio, the following query uses the explicitly supplied schema. Query-scoped measures do not persist model changes. Execution requires access to that model; the skill itself cannot execute DAX.
DEFINE
MEASURE Sales[Review Original Margin] = AVERAGE(Sales[MarginPct])
MEASURE Sales[Review Candidate Margin] =
DIVIDE(SUM(Sales[Profit]), SUM(Sales[Amount]))
EVALUATE
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL('Product'[Product], "IsGrandTotal"),
"Original", [Review Original Margin],
"Candidate", [Review Candidate Margin],
"Difference", [Review Candidate Margin] - [Review Original Margin]
)
The Product dimension in this example contains a column named Product. Adapt identifiers to supplied metadata before running. A difference is expected for this correctness fix; use the agreed business result as the oracle. A semantically preserving optimization instead needs equivalent outputs, with explicit handling of BLANK and an agreed numeric tolerance.
Validation matrix
| Context | Expected candidate | Execution status |
|---|---|---|
| A only | 10% | Not executed |
| B only | 30% | Not executed |
| A and B / grand total | 28% | Not executed |
| No fact rows | BLANK | Not executed |
| Synthetic zero revenue, nonzero profit | BLANK | Not executed |
| Viewer role restricted to A | 10%, no B data | Not executed |
Arithmetic above is hand-derived from the fixture, not a Power BI execution. Test representative real filters, date slices, returns and authorized roles before applying. No speedup is claimed.
Official references
Connects securely to your tools. The creator never sees your data.
About this skill
A DAX measure can look correct in detail rows and still produce misleading totals. This skill guides your AI agent through a structured review of the measure, its business meaning and the model context you provide.
You receive an assessment of what can be established from your input, prioritized findings tied to the supplied expressions, proposed corrections with prerequisites, and checks for detail rows, totals, slicers, blanks and relevant security roles. Performance recommendations are labeled unmeasured unless supported by actual execution evidence.
Use it for:
- Incorrect percentages, averages and grand totals.
- CALCULATE, KEEPFILTERS and filter-removal behavior.
- DAX optimization reviews that preserve business semantics.
- Regression checks before accepting a measure change.
Provide pasted DAX or readable metadata, the expected result, and relevant relationships/visual filters. An anonymized example is sufficient to start. No dedicated connector, API key or additional plugin is required for static review. The package includes a worked weighted-margin example and an adaptable DAX comparison query.
Execution and benchmarking require your own Power BI/DAX-capable environment and model access. The skill does not execute Power BI by itself, inspect an unreadable PBIX binary, guarantee a speedup, or certify a model as error-free. Actual query execution depends on the host agent's available tools and your authorized model access.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 22 days ago
Nothing to install. It runs in your AI agent.
- Optional
- Power BI DAX query vieworDAX Studio
Static review needs nothing extra. Optional execution also needs authorized access to the model.
Permissions
Read user-authorized DAX/metadata files when provided; pasted input is sufficient. Write review artifacts only when requested. No credentials, unrestricted network access, or model writes are required.