agentleFS
MicrosoftKnown publishermicrosoft/ignite26-LAB690/src/field-services-app/.agents/skills/dax-authoring/SKILL.md

dax-authoring

Skill1 starsChanged 20 days agoMITView on GitHub

Use when authoring or testing bounded DAX queries for a verified Power BI semantic-model connector.

12 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 3

    Distinctive

    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
  1. Distinctive:

    Use rayfin-connectors to verify the intended model and discover actual tables, columns, measures, relationships, and date table.

    line 7
  2. Very specific:

    Use existing measures first: [Measure] and fully qualified 'Table'[Column].

    line 9
  3. Very specific:

    Use one DEFINE block for query variables/measures.

    line 11
  4. Distinctive:

    Check date-table continuity, relationships, fiscal/calendar semantics, and filter context before time-intelligence calculations.

    line 14
  5. Very specific:

    Every semantic-model input must specify a positive integer resultSetRowCountLimit.

    line 18
  6. Distinctive:

    Use the exact envelope in the app, check errors explicitly, and also test through the deployed browser: the CLI's direct developer …

    line 40

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DAX authoring

Use rayfin-connectors to verify the intended model and discover actual tables, columns, measures, relationships, and date table. Do not invent a sales schema or model measures.

  • Use existing measures first: [Measure] and fully qualified 'Table'[Column].
  • EVALUATE requires a table expression; use ROW for scalar probes.
  • Use one DEFINE block for query variables/measures. CALCULATE takes a scalar, CALCULATETABLE a table.
  • For grouped aggregates use SUMMARIZECOLUMNS: grouping columns, filters, then named expressions. Use TREATAS for explicit filter values where appropriate.
  • Preserve BLANK and numeric values; do not use FORMAT, string decoration, or numeric coercion to fix a decoding error. Compare CLI/SDK versions and the original measure first.
  • Check date-table continuity, relationships, fiscal/calendar semantics, and filter context before time-intelligence calculations. Use the requested reporting period, not the current date by assumption.

Bound every query

Every semantic-model input must specify a positive integer resultSetRowCountLimit. Aggregate to the required grain and bound detail/member discovery too; there is no safe implicit row cap.

For a display limit of N rows, request at most N+1 and treat more than N returned rows as a visible over-limit error asking for narrower filters. Never silently slice an over-limit response. A service cap can truncate without an error, so a response at the cap is not evidence of completeness. TOPN can return ties; use a unique tie-breaker where the model supports one and retain the envelope limit and overflow check. Do not calculate totals from a potentially truncated detail set.

A schema-independent one-row transport probe:

{ "query": "EVALUATE ROW(\"Probe\", 1)", "resultSetRowCountLimit": 1 }

This proves only transport. Real app queries must use the verified model and the N+1 policy above.

Execute, inspect, integrate

Save the JSON input envelope inside the app root, then run:

npx rayfin connector invoke <alias> executeQuery --file <query.query.json>

Read installed guide cli/connectors/invoke.md and the version-matched semantic-model SDK docs for result shapes. Inspect normalized status, column names/types, row count, BLANKs, units, totals, dates, and actual values. Fix and rerun before UI integration. An overflow result error is a failed query, not proof the row cap was reached.

Use the exact envelope in the app, check errors explicitly, and also test through the deployed browser: the CLI's direct developer transport is not the deployed caller's route. Use query-design for presentation boundaries.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.