Rules / Naming Conventions

Visible name with no translation

info NAME_WITHOUT_TRANSLATION · built in · model layer · scope: Table, Column, CalculatedColumn, CalculatedTable, CalculatedTableColumn, CalculationGroupTable, Measure, Hierarchy, Level

What it checks

Visible tables, columns, measures, and hierarchies, and the levels of visible hierarchies, that a translated culture other than the model's own gives no caption.

Each finding names the object and, in its detail, the cultures it has no caption in, such as no caption in fr-FR. A culture is read when its file under definition/cultures/ has a translations block; the model's own culture, named on the culture: line in model.tmdl, is not read.

Example

Fires the rule
model Model
	culture: en-US

table Sales
	measure Revenue = 1
		formatString: #,0

cultureInfo fr-FR
	translations
		model Model
			table Sales
				caption: Ventes
After the fix
model Model
	culture: en-US

table Sales
	measure Revenue = 1
		formatString: #,0

cultureInfo fr-FR
	translations
		model Model
			table Sales
				caption: Ventes
				measure Revenue
					caption: Chiffre d'affaires

Why it matters

A caption is the name a reader sees for an object when a report is shown in that culture's language: Microsoft describes a translated caption as an alternative name that appears "when the report is rendered in a different language" (Power BI support for metadata translation). A model that carries translations for a language is meant to be read in it, so every visible name its culture leaves out is one its readers do not see in their language, beside the ones they do.

How to fix it

Give the object a caption in the culture's translations block. Power BI Desktop has no editor for translations, and Microsoft gives its TMDL view as the route for metadata that lacks a graphical interface, "such as translations" (Common use cases for TMDL view). In TMDL view, type createOrReplace on the first line of an empty tab, paste the whole cultureInfo block from definition/cultures/<culture>.tmdl beneath it, and indent the pasted lines one level, so the block sits under the command. Then give each object with no caption an entry in its place, with a caption: line one level beneath the entry, as the fixed example adds measure Revenue under table Sales: a table's entry goes under the model entry, a column's, measure's, or hierarchy's under its table's entry, and a level's under its hierarchy's entry. Where the block already has the object's entry, as it has a table's once any of the table's objects is captioned, add only the caption: line. Select Apply. Script the whole block: createOrReplace "Creates or replaces the specified semantic model objects and all the descendants" (CreateOrReplace command), so a script of part of it drops the captions it leaves out. Or edit the culture's file while Desktop is closed. For many objects at once, Microsoft's Translations Builder, an optional tool, can fill in captions, machine translations included (Create multiple-language reports with Translations Builder).

When to ignore it

When the culture's names are not meant for readers yet, such as a translation still in progress, or a culture kept for another purpose that happens to carry a translations block. Otherwise a visible object with no caption is one a reader in that language sees untranslated. A key or helper column no reader needs is better hidden than translated, which clears its finding too.

To ignore this rule on one object, add annotation pbiplint.ignore = NAME_WITHOUT_TRANSLATION under the object in its TMDL file. Power BI Desktop keeps the annotation. To turn the rule off for a whole project, set "NAME_WITHOUT_TRANSLATION": "off" under rules in pbiplint.config.json.

Quirks

Check a model for this Improve this page