Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
BESS_PremierTec
Frequent Visitor

How to Translate Field Parameter Values

A "Stacked Column Chart" needs to display data in Days, Weeks and Months on its X-Axis.  To accomplish this I created a Field Parameter via "Modeling > New Parameter > Fields".  Here's the generated code:

Production X Axis = {
    ("Month", NAMEOF('Production'[YearMonth]), 0),
    ("Week", NAMEOF('Production'[YearWeek]), 1),
    ("Day", NAMEOF('Production'[DayDate]), 2)
}
 
This slicer is sending one of three columns (YearMonth, YearWeek or DayDate) to the visual's X-Axis.  This works perfectly.

How can I translate the three labels: Month, Week and Day?
 
I have tried replacing the labels with translation labels created within the external tool "Translations Builder" but "UserCultuture()" cannot be used within a Field Parameter.  Here's that failed attempt:
 
Production X Axis = {
    ('Translated Localized Labels'[Month Label], NAMEOF('Production'[YearMonth]), 0),
    ("Week", NAMEOF('Production'[YearWeek]), 1),
    ("Day", NAMEOF('Production'[DayDate]), 2)
}
1 ACCEPTED SOLUTION
BESS_PremierTec
Frequent Visitor

One solution is to add a fourth column to the field parameter and rename it "Language".  Here it contains "en" and "fr".  The first column contains the displayed text so we translated those values:

Production Duration X Axis = {
    ("Month", NAMEOF('Production'[YearMonth]), 0, "en"),
    ("Week", NAMEOF('Production'[YearWeek]), 1, "en"),
    ("Day", NAMEOF('Production'[DayDate]), 2, "en"),
    ("Mois", NAMEOF('Production'[YearMonth]), 0, "fr"),
    ("Semaine", NAMEOF('Production'[YearWeek]), 1, "fr"),
    ("Jour", NAMEOF('Production'[DayDate]), 2, "fr")
}
 
In our PowerBI reports we have a Translations table with the columns:  Language, Description.  Go into the Model view and establish a relationship between this Slicer's Language column and the language column from your Languages table.
 
We have a Slicer on the Languages table so when we select a Language it filters the Production Duration X Axis slicer such that it only displays the english or the french labels.

View solution in original post

3 REPLIES 3
BESS_PremierTec
Frequent Visitor

One solution is to add a fourth column to the field parameter and rename it "Language".  Here it contains "en" and "fr".  The first column contains the displayed text so we translated those values:

Production Duration X Axis = {
    ("Month", NAMEOF('Production'[YearMonth]), 0, "en"),
    ("Week", NAMEOF('Production'[YearWeek]), 1, "en"),
    ("Day", NAMEOF('Production'[DayDate]), 2, "en"),
    ("Mois", NAMEOF('Production'[YearMonth]), 0, "fr"),
    ("Semaine", NAMEOF('Production'[YearWeek]), 1, "fr"),
    ("Jour", NAMEOF('Production'[DayDate]), 2, "fr")
}
 
In our PowerBI reports we have a Translations table with the columns:  Language, Description.  Go into the Model view and establish a relationship between this Slicer's Language column and the language column from your Languages table.
 
We have a Slicer on the Languages table so when we select a Language it filters the Production Duration X Axis slicer such that it only displays the english or the french labels.
BESS_PremierTec
Frequent Visitor

No we did not.

 

As far as I understand the problem, this measure (in a DirectQuery report) is being evaluated/processed before the user's language is known.  In theory if you can bypass the usage of UserCultuture(), which is how the translation system gets its language, then you might be able to translate directly in the measure.

 

We need to pass the user's language from our web application to the PowerBI report so might be able to do something like:

 

if language == "en" return 

{
    ("Month", NAMEOF('Production'[YearMonth]), 0),
    ("Week"NAMEOF('Production'[YearWeek]), 1),
    ("Day"NAMEOF('Production'[DayDate]), 2)
}
else if language == "fr" return 
{
    ("Mois", NAMEOF('Production'[YearMonth]), 0),
    ("Semaine"NAMEOF('Production'[YearWeek]), 1),
    ("Jour"NAMEOF('Production'[DayDate]), 2)
}
 
JourdanDixon
Regular Visitor

Did you ever find a solution? I'm hitting the same wall.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.