dax
Skill108 starsChanged 5 months agoMITView on GitHub
Discover Power BI semantic model schemas with DAX INFO functions, decide what belongs in DAX versus TypeScript, and author/test DAX queries for Fabric analytics dashboards.
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill for data-shape decisions: find the model objects, pick the query grain, write DAX, preview the visual, then iterate.
- Very specific: line 24
Do not over-tune the query first: write it, render with npm run preview, then fix shape/grain from the report (→ headless-preview).
- Distinctive: line 37
Start small; fetch metadata on demand.
- Very specific: line 52
Use INFO.VIEW.* first; it is read-access friendly.
- Very specific: line 55
Use elevated INFO.* only for calculation groups, calendars, UDFs, or variations.
- Very specific: line 56
Run discovery and optional sanity queries with npx fabric-app-data query <alias>.
- Very specific: line 78
Use fully qualified columns: 'Table'[Column].
- Very specific: line 79
Use simple measure names: [Measure].
- Very specific: line 81
Use one DEFINE block; separate VAR / MEASURE declarations by newlines, not commas.
- Distinctive: line 83
Prefer existing model measures over raw aggregations.
- Distinctive: line 92
Leave BLANKs and visual gap-filling to the app/spec unless the model semantics require otherwise.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
DAX — Discover, Design, Author
Use this skill for data-shape decisions: find the model objects, pick the query grain, write DAX, preview the visual, then iterate.
Fast path: Phase 1 hero slice
- Minimal discovery — run one scope probe, then inspect only the tables/measures behind the hero metric.
npx fabric-app-data query <alias> --query "EVALUATE ROW(\"TableCount\", COUNTROWS(INFO.VIEW.TABLES()), \"ColumnCount\", COUNTROWS(INFO.VIEW.COLUMNS()), \"MeasureCount\", COUNTROWS(INFO.VIEW.MEASURES()), \"RelationshipCount\", COUNTROWS(INFO.VIEW.RELATIONSHIPS()))" - Pick one visual grain — one DAX query should return exactly the rows the hero visual needs.
- Prefer model measures — use
[Measure]before re-aggregating raw columns. - Write one query, optionally sanity-test it —
npx fabric-app-data query <alias> --query '<DAX>'; fix blocking syntax/shape errors only. - Map in TypeScript — DAX computes/fetches;
toChartData/toTablemaps positional rows; the visual spec handles display.
Do not over-tune the query first: write it, render with npm run preview, then fix shape/grain from the report (→ headless-preview).
Table of contents
| Need | Read |
| Progressive schema discovery, INFO functions, scope/narrowing queries | Discovery reference |
| DAX vs TypeScript matrix, filters, multi-grain, highlighting, format strings, anti-patterns | Design reference |
| DAX syntax, core functions, query patterns, BLANK semantics, time intelligence | DAX reference |
| CLI connection/query details | fabric-data |
Progressive discovery
Start small; fetch metadata on demand.
User asks for a metric or visual
-> Know relevant tables?
-> No: INFO.VIEW.TABLES()
-> Yes: Know columns/measures?
-> No: filtered INFO.VIEW.COLUMNS() and INFO.VIEW.MEASURES()
-> Yes: Need relationship/filter path?
-> Yes: filtered INFO.VIEW.RELATIONSHIPS()
-> No: write the visual-grain DAXRules:
- Use
INFO.VIEW.*first; it is read-access friendly. - Narrow metadata with
SELECTCOLUMNS+FILTER. - Reuse discovered schema; do not re-fetch the same inventory in one task.
- Use elevated
INFO.*only for calculation groups, calendars, UDFs, or variations; skip if permissions fail afterINFO.VIEW.*works. - Run discovery and optional sanity queries with
npx fabric-app-data query <alias>; seefabric-datafor details.
DAX vs TypeScript: responsibility split
| Concern | Owner |
| Measures, aggregations, grouping grain, time intelligence | DAX |
| TopN, high-cardinality filters, payload reduction | DAX |
| Small UI filters/slicers | TypeScript or DAX depending on cost |
| Deterministic debug ordering | DAX ORDER BY |
| Merging result sets, safe totals from fetched detail, reshaping/pivoting | TypeScript |
| Non-additive totals (DISTINCTCOUNT, ratios, AVERAGEX, complex measures) | DAX separate summary query |
| Column display names | toChartData aliases / toTable columns |
| Number/date formatting | Chart spec format, card props, or table/matrix format |
| Decorative labels/icons/null placeholders | Component rendering or mapped display fields |
Decision check: if it changes meaning, filter context, measure definition, or grain, do it in DAX. If it changes presentation, use TypeScript or the visual spec.
Authoring rules
Must
- Use fully qualified columns:
'Table'[Column]. - Use simple measure names:
[Measure]. - Return a table after
EVALUATE; wrap scalar results inROW(...). - Use one
DEFINEblock; separateVAR/MEASUREdeclarations by newlines, not commas. - Aggregate in DAX to the visual's grain; never fetch low-grain rows just to roll them up client-side.
- Prefer existing model measures over raw aggregations.
- Optionally quick-test DAX with
fabric-app-data queryfor syntax/shape sanity, then usenpm run previewas the visual feedback loop.
Prefer / avoid
SUMMARIZECOLUMNSfor grouped aggregations.TREATASas filter arguments inSUMMARIZECOLUMNS.- Variables for readability and repeated filters; multiple small queries over one mixed-grain query.
- Raw typed values; avoid
FORMAT(), UI labels, SQL syntax, and friendly-name-only projections in query output. - Leave BLANKs and visual gap-filling to the app/spec unless the model semantics require otherwise.
Core query pattern
DEFINE
VAR _CategoryFilter = TREATAS({"Bikes", "Accessories"}, 'Product'[Category])
VAR _YearFilter = FILTER(ALL('Calendar'[Year]), 'Calendar'[Year] >= 2024)
EVALUATE
SUMMARIZECOLUMNS(
'Calendar'[Year],
'Product'[Category],
_CategoryFilter,
_YearFilter,
"Revenue", [Total Revenue],
"Margin %", [Margin %]
)
ORDER BY 'Calendar'[Year], [Revenue] DESCFor TopN, time intelligence, BLANK behavior, highlight overlays, filter fragments, and detailed anti-pattern corrections, open the references only when that problem appears.
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- kpbray/power-bi-agent-skills★ 9same name
- francoisbgdw/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/angular-blankapp/AGENTS.mdAGENTS.md
- templates/angular-dashboard/AGENTS.mdAGENTS.md
- templates/campus-scheduler/AGENTS.mdAGENTS.md
- templates/fabric-atlas/AGENTS.mdAGENTS.md
- templates/field-technician/AGENTS.mdAGENTS.md
- templates/finance-analytics/AGENTS.mdAGENTS.md
- templates/ibcs-trainer/AGENTS.mdAGENTS.md
- templates/maritime-insights/AGENTS.mdAGENTS.md
- templates/paragliding-insights/AGENTS.mdAGENTS.md
- templates/slide-deck/AGENTS.mdAGENTS.md
- templates/static-blankapp/AGENTS.mdAGENTS.md
- templates/todo-local-experimental/AGENTS.mdAGENTS.md
- templates/universal-app/AGENTS.mdAGENTS.md
- template-gallerySkill
- rayfinSkill
- rayfinSkill
- rayfinSkill
- rayfinSkill
- rayfinSkill
- rayfinSkill
- rayfinSkill
- rayfinSkill
- analyticsSkill
- app-designSkill
- authenticationSkill
- build-workflowSkill
- capability-routerSkill
- data-modelingSkill
- fabric-dataSkill
- graphein-visualsSkill
- headless-previewSkill
- visualsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

