tmdl

Author and edit TMDL files for Power BI semantic models in PBIP projects.

6|3|Updated Jul 4, 2026
One-click install
npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill tmdl-insightfulanalytics
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tmdl
Source: https://github.com/InsightfulAnalytics/PBI_Agentic_Dev/tree/main/plugins/pbip/skills/tmdl
Command: npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill tmdl-insightfulanalytics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Editing Power BI semantic model definitions directly as TMDL text files is error-prone: indentation is semantic, /// descriptions have strict placement rules, and some mistakes parse cleanly while silently corrupting the model. This Skill provides the syntax rules, property references, and known failure modes needed to safely author or fix .tmdl files when tools like Tabular Editor CLI or the Power BI MCP server are unavailable. ## Core Features & Use Cases - TMDL Syntax Guidance: Covers indentation depth rules, name quoting, /// descriptions versus // comments, property ordering, and multi-line DAX expression formatting for measures, columns, tables, relationships, roles, and calculation groups. - Property and Pattern References: Ships reference docs for all 30+ TMDL object types with valid enum values, column property rules (summarizeBy, formatString, PBI_FormatHint), and SQLBI naming conventions. - BIM-to-TMDL Conversion: Documents converting legacy model.bim (TMSL) to a TMDL definition/ folder via Tabular Editor CLI or the TOM TmdlSerializer. - Failure Mode Catalog: A gotchas reference documents silent corruption patterns, such as expression depth errors that delete format strings and calculation groups that break project loading without discourageImplicitMeasures. - Use Case: A developer needs to add a measure with a dynamic format string to a PBIP model under Git version control without opening Power BI Desktop; the Skill supplies the exact TMDL block, indentation depth, and the rule that formatString and formatStringDefinition cannot coexist. ## Quick Start Ask the agent to add a new measure with a description and format string to a table's .tmdl file in your PBIP project.

Frequently Asked Questions about tmdl

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

FAQPage Schema
How do I add a measure to a TMDL file in Power BI?▼

Declare the measure at one indent level inside the table block, place its DAX expression two levels deeper than the declaration, and put properties like formatString and displayFolder one level below the declaration. Use a /// line directly above the declaration at the same indent to set its description.

How do I convert model.bim to TMDL format?▼

Run Tabular Editor CLI with the -T flag pointing at a definition folder, or call TmdlSerializer.SerializeModelToFolder from TOM in PowerShell. Then delete model.bim since the formats are mutually exclusive, and confirm definition.pbism uses version 4.0 or higher.

When should I edit TMDL files directly instead of using Tabular Editor?▼

Direct TMDL editing is a last resort for PBIP files in a Git repo without Power BI Desktop, Tabular Editor CLI, or an MCP server available. It suits quick text-level fixes like descriptions and format strings, but it does not validate DAX or referential integrity.

Why does Power BI Desktop refuse to open my project after adding a calculation group?▼

A calculation group requires the discourageImplicitMeasures flag on the model object in model.tmdl, added in the same edit. Without it Power BI Desktop refuses to load the entire project, not just the calculation group.

Can a TMDL file parse successfully but still corrupt the model?▼

Yes. A measure expression written at the same depth as its properties silently swallows the format string, and generators that slice by line position can duplicate table content. Verify changes with a TmdlSerializer round trip that checks measure counts and expressions, not just a parse.

What compatibility level do DAX user-defined functions in TMDL require?▼

DAX UDFs in functions.tmdl require compatibilityLevel 1702 in database.tmdl and Power BI Desktop 26.06 or later. Older AMO/TOM assemblies throw UnsupportedObjectType on the function object when deserializing.