semantic-model

Designs, builds, refreshes, and audits Power BI tabular semantic models via the te CLI.

887|131|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/data-goblin/power-bi-agentic-development --skill semantic-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semantic-model
Source: https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/semantic-models/skills/semantic-model
Command: npx skills add https://github.com/data-goblin/power-bi-agentic-development --skill semantic-model

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Building and maintaining Power BI / Analysis Services semantic models from the terminal is error-prone: agents pick the wrong tool, break relationships, ship DAX bugs, or miss best-practice violations. This Skill provides a full lifecycle operating loop (design, build, refresh, review) with a strict tool cascade so every model change goes through the narrowest capable tool with validation gates.

Core Features & Use Cases

  • Tool cascade routing: drives edits through the te CLI first, then TOM via te script or connect-pbid, then fab + TMDL authoring as the last resort, with a save-time DAX and referential-integrity gate.
  • Full lifecycle coverage: star schema design, relationships, measures, calculation groups, RLS roles, incremental refresh, storage modes, Direct Lake, and VertiPaq size optimization.
  • Model review and audit: severity-ranked checklist covering bidirectional ambiguity, circular dependencies, memory hogs, DAX correctness, measure hygiene, and Copilot/AI readiness, with helper scripts for model metadata and AI instructions/schema retrieval.
  • Use Case: Ask the agent to "add a year-over-year measure and audit my model for best-practice violations" and it stages the measure with te add, validates with te validate, gates on te bpa run --fail-on error, and reports prioritized findings.

Quick Start

Ask the agent to review my semantic model for performance and best-practice issues using the semantic-model skill.

Frequently Asked Questions about semantic-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a measure or relationship to a Power BI semantic model from the command line?

Use the te CLI verbs: te add for measures, columns, and relationships (with Fact[Key]->Dim[Key] shorthand), staged in memory until --save. A save-time gate validates DAX and referential integrity, and te validate confirms each mutation.

How do I audit a Power BI semantic model for best practices?

Run te bpa run --fail-on error to gate on Best Practice Analyzer rules, and follow the review checklist covering bidirectional ambiguity, circular dependencies, high-cardinality columns, DAX correctness, and missing descriptions. The get_model_info.py script gathers storage mode, size, and refresh context first.

When should I use TOM or TMDL instead of the te CLI for model edits?

Use te script (in-process TOM) when te set cannot reach a property, such as alternateOf, crossFilteringBehavior, or linguistic schema content. Use fab plus direct TMDL authoring only for service-side operations like Entra role assignment, Copilot folder features, or bulk structural changes.

Does this skill support Direct Lake semantic models?

Yes, it covers Direct Lake on OneLake and on SQL, including framing after deployment, DirectQuery fallback triggers, the directLakeBehavior setting, and capacity guardrails. Note that the local Desktop proxy cannot reach Direct Lake; a remote XMLA endpoint is required.

What is the difference between this skill and the dax or tmdl skills?

This skill owns modeling judgment and the full model lifecycle, while the dax skill handles isolated DAX query performance tuning and the tmdl skill handles TMDL file syntax mechanics. Report visual editing belongs to the pbir-cli skill instead.

Why does my measure fail to save with a DAX0002 error?

DAX0002 means no relationship exists in context. Add relationships before any measure that uses RELATED() or a cross-table CALCULATE(), because the save-time gate rejects measures referencing unrelated tables.