skills/authoring-dax-measures/SKILL.md
Use when the user asks to "write a DAX measure", "create DAX calculations", "add time intelligence", "calculate YTD", "year over year", "running total", "semi-additive measure", "parent-child hierarchy", "ABC classification", "new and returning customers", "dynamic segmentation", "currency conversion", "ranking", "cumulative total", "budget allocation", or any DAX formula authoring for a Microsoft Fabric or Power BI semantic model. This skill provides DAX patterns specifically formatted as TMDL for Fabric semantic models.
npx skillsauth add accelerate-data/fabric-semantic-model authoring-dax-measuresInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive DAX pattern library for Microsoft Fabric semantic model measures. All patterns use TMDL syntax and follow Fabric best practices.
'Table'[Column] for column references.[Measure Name] for measure references (no table prefix)./: Use DIVIDE(numerator, denominator) to handle division by zero gracefully.CALCULATE('Table'[Column] = value) instead of CALCULATE(FILTER('Table', ...)) when possible.formatString on every measure./// descriptions to every measure.Requires a proper date table with an isKey date column and continuous date range with no gaps.
Core time intelligence measures:
See references/time-intelligence.md for complete patterns.
For measures that should not be summed across time (e.g., account balances, inventory levels, headcount).
See references/semi-additive.md for patterns.
For ragged/unbalanced hierarchies like chart of accounts or organizational structures.
See references/parent-child.md for patterns.
Standard business calculations: ratios, rankings, segmentation, cumulative totals, new/returning customer tracking, budget allocation.
See references/common-kpis.md for patterns.
| Type | Format String | Example Output |
|------|-------------|---------------|
| Currency (USD) | $ #,##0.00 | $ 1,234.56 |
| Currency (no decimals) | $ #,##0 | $ 1,235 |
| Percentage | 0.00% | 12.34% |
| Percentage (no decimals) | 0% | 12% |
| Integer | #,##0 | 1,235 |
| Decimal | #,##0.00 | 1,234.56 |
| Large numbers | #,##0,,M | 1M |
When the user wants to add DAX measures to a TMDL semantic model, follow this workflow:
dbt_project.yml). If found, read the schema YAML files under models/marts/ to understand available tables, columns, data types, and descriptions. This context helps generate accurate column references and appropriate measure logic.model.tmdl or database.tmdl. Read all table files from tables/ and relationships.tmdl.The user may provide a natural language description ("year over year sales growth"), a pattern name ("time intelligence", "semi-additive"), or a specific measure definition. Match it to the appropriate pattern from the reference files.
Measures on facts go in the fact table file. If a dedicated measures table exists, use that. Use dbt model names (with fct_/dim_ prefix stripped) to identify the correct TMDL table.
/// {Description of what this measure calculates}
measure '{Measure Name}' =
{DAX expression using VAR/RETURN for complex logic}
formatString: {appropriate format}
displayFolder: {logical folder grouping}
If the measure involves time: verify a date table exists with isKey on the date column, use CALCULATE + time intelligence functions, and generate the full family of related measures (base, YTD, PY, YoY, YoY %).
Read the target table's .tmdl file, append the new measure(s) after existing measures, maintain proper TMDL indentation (single tab).
references/time-intelligence.md — Complete time intelligence pattern libraryreferences/semi-additive.md — Balance sheet, inventory, and snapshot patternsreferences/parent-child.md — Chart of accounts, org hierarchy patternsreferences/common-kpis.md — Rankings, segmentation, cumulative, new/returning, budget, currencydevelopment
Use when the user asks to "validate my semantic model", "check my TMDL", "review my Fabric model", "audit my Power BI model", "run best practice checks", "lint my TMDL", or wants to verify correctness, naming conventions, relationship integrity, measure quality, or performance of a Microsoft Fabric semantic model. This skill validates TMDL files against Fabric best practices.
development
Use when the user asks to "design a Fabric semantic model", "create a TMDL model", "build a Fabric star schema", "convert dbt to TMDL", "scaffold a Fabric tabular model", "set up a Fabric dataset", "create a Power BI semantic model", or needs guidance on Microsoft Fabric TMDL file structure, naming conventions, DirectLake configuration, or Fabric semantic model architecture best practices. This skill is specifically for Microsoft Fabric and Power BI semantic models, not general data modeling.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.