Build, debug or optimize Power BI semantic models, DAX measures and Power Query M. Use for filter context and row context, CALCULATE, ALL/REMOVEFILTERS/KEEPFILTERS, iterators like SUMX, RANKX ranking, time intelligence (month-over-month, year-over-year) and date tables, relationship direction and cardinality, measures vs calculated columns, grand totals or subtotals that differ from row values, slicer and drill-down behaviour, row-level security, PBIX/PBIP/TMDL files, and slow visuals.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Power Bi Dax Expert?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/khoavd18-power-bi-dax-expert)
---
name: power-bi-dax-expert
description: Build, debug or optimize Power BI semantic models, DAX measures and Power Query M. Use for filter context and row context, CALCULATE, ALL/REMOVEFILTERS/KEEPFILTERS, iterators like SUMX, RANKX ranking, time intelligence (month-over-month, year-over-year) and date tables, relationship direction and cardinality, measures vs calculated columns, grand totals or subtotals that differ from row values, slicer and drill-down behaviour, row-level security, PBIX/PBIP/TMDL files, and slow visuals.
---
# Power BI & DAX Expert
Writes DAX whose filter semantics are explicit and tested at every level of the visual. Treats the semantic model as code.
## Inputs
- The semantic model: tables, relationships (cardinality, direction, active/inactive), date table, and existing measures. For PBIP/TMDL, read the `.tmdl` files. A PBIX is binary and needs Power BI Desktop or external tools to inspect.
- The metric's business definition (from **kpi-metrics-engineer**), and the visual layout it appears in.
## Procedure
1. **Inspect the model**: star schema or not, fact grains, dimension keys, and the marked date table.
2. **Identify grains** of each fact. Targets and actuals often differ (monthly target vs daily sales).
3. **Check relationships**: one-to-many single-direction by default. List every bidirectional, many-to-many and inactive relationship and its reason.
4. **Get the definition**: numerator, denominator, aggregation rule, blank/zero semantics, and period logic.
5. **Write the measure** with explicit semantics: variables, `DIVIDE`, `CALCULATE` modifiers chosen on purpose. Patterns are in [dax-patterns.md](references/dax-patterns.md).
6. **Test totals and subtotals**: does the grand total equal the definition applied at total level? It is not necessarily the sum of the rows.
7. **Test slicers and cross-filtering**: each slicer alone and in combination, including selections with no data.
8. **Test hierarchies**: drill levels, ragged hierarchies, manager-of-manager filtering.
9. **Validate period comparisons**: partial current period, missing prior period, fiscal vs calendar year.
10. **Reconcile** against an independent source calculation (SQL/Python) using [model-validation.md](references/model-validation.md).
## Rules
- Measures are evaluated in filter context at query time. Calculated columns are computed at refresh in row context. Never use a calculated column where the value must respond to slicers.
- `ALL`, `REMOVEFILTERS` and `ALLSELECTED` change the business meaning. Justify each one, stating which filter is removed and why the business wants that.
- Bidirectional relationships are not a fix for a missing filter. Prefer `CROSSFILTER` or `TREATAS` inside the specific measure.
- Many-to-many relationships need a written justification and a fan-out test.
- Time intelligence requires a contiguous date table marked as a date table, related to the fact on a date-typed column.
- Use `DIVIDE(n, d)` and decide BLANK vs 0 per the metric contract. Do not add `+ 0` to force zeros without a reason, because it creates rows for every dimension member.
- Check that exported data (Export data / Analyze in Excel) matches the displayed values, including totals.
- RLS: test with "View as" for each role, and confirm totals do not leak restricted rows.
- Never claim a PBIX/PBIP change was validated unless Power BI Desktop, Tabular Editor, DAX Studio or another real tool opened it and evaluated the measures. Otherwise report the change as **NOT TESTED** (static review only).
## Outputs
Measure DAX with comments, a test matrix (rows × filters × expected vs actual), notes on model changes, and the reconciliation evidence or an explicit NOT TESTED label.
## Hand-offs
Metric definitions and aggregation rules → **kpi-metrics-engineer**. Model redesign → **analytics-architect**. Visual design → **analytics-storytelling**. Source reconciliation → **data-quality-auditor**.