tmdl-standards

Define ANSI C++ grammar and lexical rules for the gll1parser library.

2|Updated May 1, 2026
One-click install
npx skills add https://github.com/jonathan-pap/PowerBI-Claude-Design --skill tmdl-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tmdl-standards
Source: https://github.com/jonathan-pap/PowerBI-Claude-Design/tree/main/tmdl-standards
Command: npx skills add https://github.com/jonathan-pap/PowerBI-Claude-Design --skill tmdl-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TMDL syntax ground rules for Power BI semantic models. Use this whenever writing or reviewing TMDL for tables, columns, measures, DAX UDFs, or calculation groups. Always consult before generating any TMDL — these rules govern indentation, object declaration, property syntax, and measure formatting. For UDF type system and examples see dax-udf/SKILL.md. For calculation group patterns see calc-groups/SKILL.md.

Core Features & Use Cases

  • TAB indentation only — Never spaces. Mixed tabs/spaces cause parse errors.
  • Object declaration: objectType objectName or objectType 'Name With Spaces'
  • Properties: propertyName: value (colon-delimited)
  • Expressions: objectType Name = expression or objectType Name =\n\t<expression> (equals-delimited)
  • Single quotes around names containing spaces, dots, colons, equals, or apostrophes
  • Boolean shortcut: isHidden alone means isHidden: true
  • Descriptions: Triple-slash /// on the line immediately above the object declaration
  • Multi-line expressions: Indent one extra level beyond the property line
  • Case: Keywords use camelCase (dataType, formatString, isHidden)
  • Comments: Use // for inline comments inside expression blocks

DAX UDFs in TMDL

UDFs use a createOrReplace block with the function declaration directly at 1 TAB — no ref table wrapper. The parameter list and body sit 2 levels deeper (3 TABs). For the full UDF type system (Scalar subtypes, Val/Expr modes, AnyRef), see dax-udf/SKILL.md.

Calculation Group Tables

Calculation groups use createOrReplace with a table declaration at 1 TAB. calculationGroup items are nested inside calculationGroup at 3 TABs. column entries are siblings of calculationGroup at 2 TABs. For complete calculation group patterns (Time Intelligence, Scenario, Currency, precedence rules, None item), see calc-groups/SKILL.md.

Naming Conventions

  • Objects: PascalCase for tables; Measures wrapped in quotes if containing spaces
  • Display folders: Title Case
  • Measures: 'Title Case In Quotes'
  • Columns: PascalCase

formatString Quick Reference

  • Powerful formatting options for currency, dates, and percentages

Common Pitfalls

  • TMDL parse error due to mixed tabs and spaces
  • Incorrect wrapping of names with spaces
  • Wrong parameter modes in UDFs
  • Incorrect calc group pattern formatting

Frequently Asked Questions about tmdl-standards

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

FAQPage Schema
How do I fix TMDL parse errors caused by mixed tabs and spaces in Power BI?

Object names in TMDL require single quotes when they contain spaces, dots, colons, equals, or apostrophes. This formatting rule ensures correct parsing of Power BI semantic model objects like tables, columns, and measures.

How do I format DAX UDFs in TMDL?

TMDL properties are colon-delimited using the syntax propertyName: value. Expressions are equals-delimited using objectType Name = expression, with multi-line expressions indented one extra level beyond the property line.

What are the naming conventions for Power BI TMDL objects?

TMDL naming conventions require PascalCase for tables and columns, and Title Case wrapped in single quotes for measures. Display folders also use Title Case to ensure consistent formatting across Power BI semantic models.

How do I format calculation groups in TMDL syntax?

Calculation groups in TMDL use a createOrReplace block with the table declaration at 1 TAB. Calculation group items nest inside calculationGroup at 3 TABs, while column entries are siblings at 2 TABs.