TMDL Format Error
Power BIPower 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]'
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'
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'
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:
measure '# Products' = COUNTROWS('Product') * 1
formaString: #,##0measure '# Products' = COUNTROWS('Product') * 1
formatString: #,##0From 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
- GitHub issue: TabularEditor/TabularEditor issue 1185. The issue description. Read 2026-10-03.
- Microsoft Learn: Power BI Desktop project semantic model folder. The screenshot under "TMDL errors". Read 2026-10-03.
- Microsoft forum: Metadata updates in Power BI Service causes issues with GIT integration. The original post. Read 2026-10-03.
- GitHub issue: TabularEditor/TabularEditor3 issue 1277. The maintainer's reply of 2024-04-17. Read 2026-10-03.
Written by Vishnu Shankar.