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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Talgat2050
New Member

Transform data into new column from mixed data: from country codes to country names

Hi,

In data.country column I have full Country names (like Turkey) and country codes (like TR)

 

Because the data comes from various sources. My task is to display only the names of countries in a new column, without country codes, i.e. Turkey's country code TR would change to Turkey- country name in the new column. I think it should be done through DAX functions.

 

Thank you

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Talgat2050 

If you have build a bidirectional relationship between two tables based on field "Country code", then you can consider using the following formula to create a calculated column.

Country Name = RELATED(Table1[Country names])

If I misunderstood, please share the sample to explain further.

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Talgat2050 

If you have build a bidirectional relationship between two tables based on field "Country code", then you can consider using the following formula to create a calculated column.

Country Name = RELATED(Table1[Country names])

If I misunderstood, please share the sample to explain further.

Best Regards,
Community Support Team _ Eason

Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.