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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
malinil
Frequent Visitor

IF "country code" then "name of country" measure (Live connection)

Hi everyone,

 

I have a live connection where one of the columns is a country code. For example MAR=Argentina and MUS=United States. In my report I would like to show the country name instead of the country code.

 

Previously, in another report without the live connection where I had a dataset, I've solved it by creating a calculated column with an IF statement. 

CountryName = IF('Report'[el2]="MAR","Argentina",IF('Report'[el2]="MUS","United States" ............. etc

 

Since I cannot create a calculated column with a live connection, I was trying to do something similar with a measure but can't get it to work. Any ideas?

 

Best,

Malin

1 ACCEPTED SOLUTION

I doubt you can use a measure because measures can’t be used for rows, columns or slicers. I think the only option is to make the change in your live source 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

3 REPLIES 3

I doubt you can use a measure because measures can’t be used for rows, columns or slicers. I think the only option is to make the change in your live source 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

@MattAllington

 

Out of complete ignorance with anything to do with live connections, isn't it possible to create tables using DAX in this type of model/scenario?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Ok, I see. Thanks for your reply!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors