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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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