cancel
Showing results for 
Search instead for 
Did you mean: 
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

@Anonymous , see if this can help

https://datachant.com/2017/01/07/translate-text-power-bi-azure-translator/



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau 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
Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Ignite 2022

What's Next at Microsoft Ignite 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Top Solution Authors