TMDL Format Error
Power BIThe message, with the parts that change in brackets:
TMDL Format Error: Parsing error type - [type] Detailed error - [detail] Document - '[file]' Line Number - [n] Line - '[line]'
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.
- Usually
- The file starts with a byte order markA property name is misspelledThe Power BI service saved the file in a newer formatA blank line follows a documentation commentA role filter is written as permissionA translation is written as translatedCaption
- Fix
- Open the file named in
Documentand go to the line it gives.
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]'
Read it in this order
Parsing error typeThe clue to the cause. InvalidLineType points to cause 1, the file starts with a byte order mark.DocumentThe file to open.Line NumberThe line to go to in that file.LineThe line as Power BI Desktop read it.
5 more reports of this message
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'
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: Empty! Document - './relationships' Line Number - 5 ... InnerException0.PowerBINonFatalError_ErrorCode: DataModelLoadFailed
TMDL Format Error: Parsing error type - UnsupportedObjectType Detailed error - Unsupported object type - permission is not a supported property in the current context! Document - './roles/[role name]' Line Number - 3 Line - ' permission [table name] = [region] = LOOKUPVALUE([security table][region],Se'
TMDL Format Error: Parsing error type - UnknownKeyword Detailed error - Unsupported property - translatedCaption is not a supported property in the current context! Document - '' Line Number - 10 Line - ' translatedCaption: Ventes'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
InvalidLineTypeon line 1. The quotedLinestarts with it, beforedatabase. A Tabular Editor maintainer confirmed this cause and changed its default to save without one.Source: TabularEditor/TabularEditor3 issue 1277[7], TabularEditor/TabularEditor issue 1185[1].
The Report Doctor doesn't detect this yet.A property name is misspelled
Microsoft's own example has
formaStringwhere TMDL expectsformatString. Power BI Desktop reportsUnknownKeywordand names the property it does not know.Source: Power BI Desktop project semantic model folder[2].
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
culturetocultureInfoinmodel.tmdl, and Power BI Desktop 2.128 reportedUnsupportedObjectType.Source: Metadata updates in Power BI Service causes issues with GIT integration[3].
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.A blank line follows a documentation comment
A
///comment documents the object under it, so the issue's author says it has to sit directly above that object. In the quoted case a///block at the top ofrelationships.tmdlwas followed by a blank line. Power BI Desktop reportedInvalidLineTypewithUnexpected line type: Empty!on that blank line. Removing the block let the project open.Source: Kemetra/Seshat-BI issue 494[4].
The Report Doctor doesn't detect this yet.A role filter is written as permission
The object that holds a role's filter on a table is
tablePermission. In the quoted case two role files usedpermission, and Power BI Desktop reportedUnsupportedObjectTypeon that line. The issue's author says the fix is to rename it in both files, and points to the example in the Microsoft Learn TMDL overview.Source: alessandrorapitiagic/retail-data-platform-copilot-lab issue 4[5].
The Report Doctor doesn't detect this yet.A translation is written as translatedCaption
In a culture, a translated object takes
caption,descriptionordisplayFolder. Those are the three the Microsoft Learn reference lists, and its pt-PT example usescaption.translatedCaptionis not one of them. We wrote it in a script in TMDL view, and Power BI Desktop reportedUnknownKeywordon that line.Document - ''means the text came from TMDL view, not from a file.Source: Object definitions in Tabular Model Definition Language (TMDL)[8], Power BI Desktop 2.159.883.0, Studio fixture F11[6].
The Report Doctor doesn't detect this yet.
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. If the line is a /// comment followed by a blank line, remove the comment or put the object directly under it. If the line starts with permission, rename it tablePermission. If it says translatedCaption, write caption. Which one applies depends on the parsing error type.
In tables/Product.tmdl:
measure '# Products' = COUNTROWS('Product') * 1
formaString: #,##0Line 2: add t.
measure '# Products' = COUNTROWS('Product') * 1
formatString: #,##0From the SalesSense sample project by Rui Romano (MIT licence).
The Power BI Report Doctor does not find five of these causes yet. It cannot find the sixth, a file the Power BI service saved in a newer format.
Other messages that stop a project opening, by the file that causes each: Power BI Desktop can't open a PBIP.
Worth knowing
- Most editors show the encoding in the status bar. "UTF-8 with BOM" is the one to change.
Sources
- [1]GitHub issue: TabularEditor/TabularEditor issue 1185. The issue description. Read 2026-10-03.
- [2]Microsoft Learn: Power BI Desktop project semantic model folder. The screenshot under "TMDL errors". Read 2026-10-03.
- [3]Microsoft forum: Metadata updates in Power BI Service causes issues with GIT integration. The original post. Read 2026-10-03.
- [4]GitHub issue: Kemetra/Seshat-BI issue 494. The issue description, "What happened". Read 2026-10-04.
- [5]GitHub issue: alessandrorapitiagic/retail-data-platform-copilot-lab issue 4. The issue description, "Problema" and "Causa". Read 2026-10-04.
- [6]Desktop run: Power BI Desktop 2.159.883.0, Studio fixture F11. Our run on Wide World Importers open data: a script applied in TMDL view. The copied text lost its line breaks. Seen 2026-10-22.
- [7]GitHub issue: TabularEditor/TabularEditor3 issue 1277. The maintainer's reply of 2024-04-17. Read 2026-10-03.
- [8]Microsoft Learn: Object definitions in Tabular Model Definition Language (TMDL). The section "Translations in TMDL", its table of properties and its pt-PT example. Read 2026-10-23.
Did this page help?
It tells us which pages to fix first.