Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A field parameter can support translations for a column in a multiple-language report in Power BI. Most reports contain more than just one column that requires data translations. You must ensure the mechanism you use to select a language can be synchronized across multiple field parameters. To test this approach working with the project in this series of articles, create a second field parameter to translate product category names from the Products table.
Create a field parameter
In Power BI Desktop, in the Modeling ribbon, select New parameter > Fields.
In the Parameters dialog box, enter the name Translated Category Names.
Populate the fields with the columns from the Products table for the desired languages.
Select Create.
Open the Table view. Select the table to view the Data Analysis Expressions (DAX) code. Update the code to match the following code.
Translated Category Names = { ("Category", NAMEOF('Products'[CategoryTranslationEnglish]), 0, "en"), ("CategorÃa", NAMEOF('Products'[CategoryTranslationSpanish]), 1, "es"), ("Catégorie", NAMEOF('Products'[CategoryTranslationFrench]), 2, "fr"), ("Kategorie", NAMEOF('Products'[CategoryTranslationGerman]), 3, "de") }
After you make your changes, the Category value is localized and there's a new column.
Double-click Value4 and change the name to LanguageId.
Update the model
After you create the new field parameter, you need to update the model to use it.
In Power BI Desktop, open the Model view.
Locate the Translated Category Names table and the Languages table.
Drag LanguageId from Translated Category Names to the Languages table to create a one-to-one relationship.
The language filter now affects categories.
You have now learned how to synchronize the selection of language across multiple field parameters. This example involves two field parameters. If your project involves a greater number of columns requiring data translations such as 10, 20 or even 50, you can repeat this approach and scale up as much as you need.
Note
You can test your implementation of data translations in Power BI Desktop by changing the filter on the Languages table. However, the other two types of translations don't work correctly in Power BI Desktop. You have to test metadata and report label translations in the Power BI service.