bi-dax-knowledge
Skill2 starsChanged 4 months agoApache-2.0View on GitHub
DAX knowledge base for teaching a BI agent to reason about, generate, review, and performance-tune DAX for Power BI / tabular models. Use when the task involves writing or auditing DAX measures, building time-intelligence / segmentation / ranking / customer / currency calculations, reviewing a semantic model, diagnosing physical or virtual filter propagation, calculation-group precedence, semi-additive totals, blank/zero semantics, or explaining DAX concepts and pitfalls. Covers core concepts, best practices, anti-patterns, performance notes, a curated pattern library, reusable metric contracts, and analyzer rules.
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- approval-consoleSkill
- approval-evidence-packSkill
- business-knowledge-interviewSkill
- capabilitiesSkill
- consumer-data-dictionarySkill
- cross-table-lineageSkill
- dagster-orchestration-adapterSkill
- dashboard-designSkill
- dashboard-intelligenceSkill
- dbt-transformation-adapterSkill
- evidence-pack-generatorSkill
- first-hour-compassSkill
- friendly-pr-reviewerSkill
- grain-confidence-reviewerSkill
- kpi-contract-builderSkill
- pbi-mcp-write-adapterSkill
- pbip-workflowSkill
- pbip-xraySkill
- pbir-authoring-adapterSkill
- portfolio-watchSkill
- powerbi-dashboard-designSkill
- pr-readiness-reviewerSkill
- readiness-viewerSkill
- release-notes-generatorSkill
- report-intent-interviewSkill
- retail-build-warehouseSkill
- retail-control-roomSkill
- retail-discover-portfolioSkill
- retail-governSkill
- retail-initSkill
- retail-onboard-tableSkill
- retail-orchestrateSkill
- retail-scaffoldSkill
- retail-semantic-checkSkill
- retail-validateSkill
- run-next-readinessSkill
- seshat-studioSkill
- showcase-buildSkill
- source-mappingSkill
- speckit-analyzeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-git-commitSkill
- speckit-git-featureSkill
- speckit-git-initializeSkill
- speckit-git-remoteSkill
- speckit-git-validateSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
- bi-analyst-knowledgeSkill
- bi-bigdata-knowledgeSkill
- bi-python-knowledgeSkill
- bi-sql-knowledgeSkill
- retail-kpi-knowledgeSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Ground the model: Read references/retail-schema.md.
- Very specific: line 44
Tune: Use knowledge/dax-performance-notes.md to choose between equivalent formulations and to explain *why* a rewrite is faster.
- Very specific: line 109
All DAX is original teaching code on the fictional retail schema.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
BI DAX Knowledge
A teaching + reference layer for a Business Intelligence agent working with DAX. It separates explanation (Markdown, for reasoning and teaching) from structured rules (JSON, for precise generation and automated review).
When to use this skill
Trigger for any of: writing a DAX measure or calculated column; reviewing/auditing existing
DAX; building time intelligence (YTD, YOY, rolling, running totals), segmentation, ABC, ranking,
new/returning customers, events-in-progress, what-if parameters, or currency conversion;
reviewing a semantic model for DAX prerequisites; or explaining a DAX concept/pitfall.
Also trigger for ambiguous relationship paths, TREATAS/virtual-filter defects, interacting
calculation groups, semi-additive snapshot totals, and blank-versus-zero behavior.
How to use it (recommended workflow)
- Ground the model. Read
references/retail-schema.md. Map the user's real tables/columns onto these roles, or substitute their model. Never assume column names. - Reason from concepts first.
knowledge/dax-core-concepts.mdis the mental model (filter vs row context, context transition, CALCULATE, VAR, ALLSELECTED, lineage). Most bugs are concept errors, not syntax errors. - Pick the pattern. Find the matching entry in
patterns/dax-patterns.json(or read a worked version inknowledge/dax-retail-examples.md). Use itsdax_shape,key_rule,when_to_use,avoid_when, andcommon_mistakes. - Instantiate via a metric contract.
patterns/metric-contract-patterns.jsongives the structured spec (grain, additivity, required model features, validation, phase support). Define the contract before writing code. - Generate or review against the rules. Apply
patterns/analyzer-rules.jsonwhile generating, and as a checklist when auditing. Respectknowledge/dax-best-practices.mdand avoid everything inknowledge/dax-anti-patterns.md. - Tune. Use
knowledge/dax-performance-notes.mdto choose between equivalent formulations and to explain why a rewrite is faster. - Diagnose semantic behavior. For relationship, calculation-group, semi-additive, or blank
symptoms, use the focused
DX-*route inINDEX.mdand end onchecklists/dax-diagnostic-checklist.md.
Phases the agent supports
- generate — scaffold correct DAX from a metric contract + pattern.
- analyze — audit existing DAX/measures against
analyzer-rules.json. - model_review — check the semantic model for a contract's prerequisites (marked Date table, snapshot facts, disconnected param tables, config-table integrity, etc.).
Each pattern (future_agent_use) and contract (phase_support) declares which phases it serves.
File map
bi-dax-knowledge/
├─ SKILL.md ← this file (interface)
├─ INDEX.md ← the router (open after this file)
├─ README.md ← overview, scope, boundaries
├─ references/
│ ├─ retail-schema.md ← the fictional model all examples use
│ └─ source-map.md ← attribution + how content was derived
├─ knowledge/ ← Markdown: teaches the agent (read for reasoning)
│ ├─ dax-core-concepts.md ← concise on-ramp + index to the deep dives
│ ├─ dax-evaluation-context-deep-dive.md ← CC-001..003,008,009,018 (Definitive Guide, Slice 1)
│ ├─ dax-calculate-deep-dive.md ← CC-004..006,010,011,016,019 (Definitive Guide, Slice 1)
│ ├─ dax-function-semantics.md ← per-function return type/blank/gotchas (Definitive Guide, Slice 2)
│ ├─ dax-engine-internals.md ← SE vs FE, callbacks, VertiPaq/cardinality (Definitive Guide, Slice 3)
│ ├─ dax-performance-diagnostics.md ← triage workflow + 8 diagnostic playbooks (Slice 3)
│ ├─ dax-best-practices.md ← BP-xxx rules
│ ├─ dax-anti-patterns.md ← AP-xxx mistakes
│ ├─ dax-performance-notes.md ← intro perf primer (the "why" lives in engine-internals)
│ ├─ dax-retail-examples.md ← worked original examples
│ ├─ dax-relationships-and-virtual-filters.md ← DX-REL-* propagation diagnostics
│ ├─ dax-calculation-groups-and-precedence.md ← DX-CG-* composition diagnostics
│ └─ dax-semi-additive-and-blank-semantics.md ← DX-SA-* total/display diagnostics
├─ patterns/ ← JSON: precise reusable rules (read for generation/review)
│ ├─ dax-patterns.json ← 20-pattern library (per-pattern schema)
│ ├─ metric-contract-patterns.json ← 21 reusable metric specs (+ concept links, phase support)
│ ├─ analyzer-rules.json ← 20 enforceable AR-xxx rules (+ detectability/required_inputs/promoted_from)
│ └─ analyzer-rule-candidates.json ← ARC-xxx candidates; 10 promoted, 6 still staged (analyzer_v2/human)
└─ checklists/ ← short copy-me checklists (the artifact a route ends on)
├─ metric-contract-checklist.md ← fill a metric contract before writing DAX
├─ dax-measure-review-checklist.md ← pre-merge review of a measure
├─ dax-model-review-checklist.md ← semantic-model DAX prerequisites
└─ dax-diagnostic-checklist.md ← focused semantic diagnostic verdict
references/agent-training-set.md ← graded Q&A bank (36 items, 7 categories) for teaching/eval
references/agent-training-set.json ← machine-gradeable twin (same items)Cross-reference scheme
- Best practices:
BP-xxx· Anti-patterns:AP-xxx· Analyzer rules:AR-xxx· semantic diagnostics:DX-REL-xxx,DX-CG-xxx,DX-SA-xxx. - Patterns link to contracts via
related_metric_contract; contracts link back viamaps_to_patterns; analyzer rules link to BP/AP docs viarefs.
Scope and boundaries
- Depth is code + key rules: the highest-value patterns with templates, rules, and original examples — not an exhaustive reproduction of any book.
- All DAX is original teaching code on the fictional retail schema. No verbatim
copyrighted code or sample model is reproduced. See
references/source-map.md. - This is a knowledge layer, not an execution engine: it does not run queries against a live model. Pair it with the user's model metadata for concrete generation/review.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

