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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
U156531
Post Patron
Post Patron

Issue with using a calculated column in a selection list

I'm using the following calculated column (CityRename) in a slection list. I'm finding that the slection list doesn't provide the correct results if I choose "Dear Park". In Managed relationships I've made a relationship between the City[name] and the city name field in the table I'm trying to link to.  Does anyone have a suggestion?

CityRename = if ('City'[name] in {"Dear Field","Dear Park"} , "Dear Park",'City'[name])

1 ACCEPTED SOLUTION
ExcelMonke
Super User
Super User

Consider changing the calculation to:

CityRename = 
SWITCH(
'City'[Name],
"Dear Field","Dear Park",
"Dear Park", "Dear Park",
'City'[Name]
)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
ExcelMonke
Super User
Super User

Consider changing the calculation to:

CityRename = 
SWITCH(
'City'[Name],
"Dear Field","Dear Park",
"Dear Park", "Dear Park",
'City'[Name]
)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks, That helped one of my visuals. Do you happen to know why similar fields in the same table do not seem to be connectd? It seems that the CityRename and the 'City'[Name]' are not necessarily interchangeable even if they contain the same values. 

It is hard to say with the information given so far. If you are able, please share your current scenario, and intended scenario (screenshots, etc.)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Kudoed Authors