cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

column dynamic language translation

Hi,

we have the following dataset, in this dataset there are months in different languages, these should be translated into German if possible.

 

Bildschirmfoto 2020-12-18 um 17.42.30.png

 

A quite simple implementation is possible with python, is there a solution to solve this challenge, using PBI standard functions?

 

Best, 

Cornelius

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

If you want to use DAX function to achieve it, you need to create a Table including different months from different regions, and a Germany month column like this:

month.png

Then you can create a calculated column in the source table to 'translate' the month column:

Germany month translation =
IF (
    'Table'[Month] IN DISTINCT ( 'Month'[Germany month] ),
    [Month],
    LOOKUPVALUE ( 'Month'[Germany month], 'Month'[Month], 'Table'[Month] )
)

re.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi everyone,

 

Here you find tool for reports (.pbix) translation - Power Translate! Very clear and easy to use, moreover the tool has been verified by MS AppSource.

 

Power Translate — an indispensable tool that will help you translate display elements (such as titles, headers, name of measures) placed in the Power BI created reports.

 

Here you can find also video with instruction - AppSource - Power Translate.

v-yingjl
Community Support
Community Support

Hi @Anonymous ,

If you want to use DAX function to achieve it, you need to create a Table including different months from different regions, and a Germany month column like this:

month.png

Then you can create a calculated column in the source table to 'translate' the month column:

Germany month translation =
IF (
    'Table'[Month] IN DISTINCT ( 'Month'[Germany month] ),
    [Month],
    LOOKUPVALUE ( 'Month'[Germany month], 'Month'[Month], 'Table'[Month] )
)

re.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

PhilipTreacy
Super User
Super User

Hi @Anonymous 

You can use lookup values in a Record to do the translation in Power Query.  You could also use another table and do a join on the month name, but the lookup using a record I think would be easier.

 

 

let
    Months = [ 
                JANUARY = "Januar", 
                FEBRUARY = "Februar",
                MARCH = "März",
                APRIL = "April",
                MAY = "Mai",
                JUNE = "Juni",
                JULY = "Juli",
                AUGUST = "August",
                SEPTEMBER = "September",
                OCTOBER = "Oktober",
                NOVEMBER = "November",
                DECEMBER = "Dezember",

                JANUARI = "Januar", 
                FEBRUARI = "Februar",
                MAART = "März",
                // APRIL
                MEI = "Mai",
                JUNI = "Juni",
                JULI = "Juli",
                AUGUSTUS = "August",
                //SEPTEMBER
                OKTOBER = "Oktober"
                //NOVEMBER
                //DECEMBER
            ],
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8irNS1WK1QExcirBDMfS9NLiEjAzOLWgJDU3KbUIoiIxrzSxKBPMdktNKoJzfBMTiyAaHAuKMnMgYqlAuVgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Month = _t]),
    #"Added Custom" = Table.AddColumn(Source, "NewMonth", each Record.Field(Months, Text.Upper([Month])))
in
    #"Added Custom"

 

 

month-translate.png

Where a month has already been listed in another language, I've left a commented out line (Apr, Sep, Nov and Dec in Dutch).

I'm using Text.Upper([Month]) to ensure the match is case insensitive.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


amitchandak
Super User
Super User

Fowmy
Super User
Super User

@Anonymous 

Unfortunately, there is no option or function in DAX to perform the translation as you desire but, you can try the Run Python Script option in Power Query under the transform tab to incorporate your Python code for translation.

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors