tmdl-standards

Community

Standards for TMDL syntax in Power BI models.

Authorjonathan-pap
Version1.0.0
Installs0

System Documentation

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

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: tmdl-standards
Download link: https://github.com/jonathan-pap/PowerBI-Claude-Design/archive/main.zip#tmdl-standards

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.