TMDL Format Error

Power BI

Power BI Desktop read a .tmdl file in the project and found something it does not accept. The dialog names the file in Document, the line, and a parsing error type. The type is the best clue to the cause.

How the message appears

Copied exactly from each source. A name in square brackets replaced one from someone else's project.

There's a problem with the definition content in your Power BI Project.
TMDL Format Error:
	Parsing error type - InvalidLineType
	Detailed error - Unexpected line type: Other!
	Document - './database'
	Line Number - 1
	Line - 'database [model name]'
GitHub issue: TabularEditor/TabularEditor issue 1185. Read 2026-10-03.Identifiers replaced
Unable to open file
There's a problem with the definition content in your Power BI Project.
TMDL Format Error:
	Parsing error type - UnknownKeyword
	Detailed error - Unsupported property - formaString is not a supported property in the current context!
	Document - './tables/Product'
	Line Number - 6
	Line - '		formaString: #,##0'
Microsoft Learn: Power BI Desktop project semantic model folder. Read 2026-10-03.Typed from a screenshot
TMDL Format Error:
Parsing error type - UnsupportedObjectType
Detailed error - Unsupported object type - cultureInfo is not a supported property in the current context!
Document - './model'
Line Number - 36
Line - 'ref cultureInfo en-US'
Microsoft forum: Metadata updates in Power BI Service causes issues with GIT integration. Read 2026-10-03.

In general form, with the parts that change in brackets:

TMDL Format Error: Parsing error type - [type] Detailed error - [detail] Document - '[file]' Line Number - [n] Line - '[line]'

The fix

Open the file named in Document and go to the line it gives. Correct the property name, or save the file without a byte order mark. If the Power BI service changed the file, undo the change there or put the old name back, as the poster describes with cultureInfo and culture. Which one applies depends on the parsing error type.

In tables/Product.tmdl:

Broken
measure '# Products' = COUNTROWS('Product') * 1
	formaString: #,##0
Fixed
measure '# Products' = COUNTROWS('Product') * 1
	formatString: #,##0

From the SalesSense sample project by Rui Romano (MIT licence).

What causes it

The file starts with a byte order mark

A byte order mark is an invisible character some tools write at the start of a UTF-8 file. Power BI Desktop expects TMDL files without one, and reports InvalidLineType on line 1. The quoted Line starts with it, before database. A Tabular Editor maintainer confirmed this cause and changed its default to save without one.

Source: TabularEditor/TabularEditor3 issue 1277, TabularEditor/TabularEditor issue 1185.

The Report Doctor doesn't detect this yet.

A property name is misspelled

Microsoft's own example has formaString where TMDL expects formatString. Power BI Desktop reports UnknownKeyword and names the property it does not know.

Source: Power BI Desktop project semantic model folder.

The Report Doctor doesn't detect this yet.

The Power BI service saved the file in a newer format

In the quoted case the Power BI service changed culture to cultureInfo in model.tmdl, and Power BI Desktop 2.128 reported UnsupportedObjectType.

Source: Metadata updates in Power BI Service causes issues with GIT integration.

The Report Doctor can't detect this, because whether a release accepts the file depends on which Power BI Desktop opens it, and the files do not say.

Worth knowing

  • Most editors show the encoding in the status bar. "UTF-8 with BOM" is the one to change.

Check a project in your browser

The Power BI Report Doctor reads a PBIP folder or .zip and lists the file and line to fix. Nothing is uploaded.

Sources

Written by Vishnu Shankar.

Your JSON and text are processed entirely in your browser and are never sent anywhere. To understand how the site is used we record each page view (the page, the referrer and an approximate location from your IP address) and keep it for 90 days. Nothing is stored on your device unless you choose it. Accept to also store a device identifier here and record your browser and device characteristics, which is what lets a return visit be told from a new one. Decline and nothing is sent at all. We respect Do Not Track. See our privacy policy.