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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rssilvaba
Resolver II
Resolver II

slicer with only country names present in a column/table

Hi All, New to PowerBI.

One of the columns I have is the code for the country (206,250 etc) and I am trying to create a slicer that shows only the country names available within the data table.

 

I am able to create a distinc table which in my case is a column for France and Germany codes. I have another table with the code and it's repective name.

Altough I could not find a way to create a new table only for these two values dinamically.

Any ideas?
Thanks!

1 ACCEPTED SOLUTION

Hi, The relationship only is not enouh the slicer shows all countries.

I figured it out by adding the following column:

CountryName = RELATED('Country Code'[Country])

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @rssilvaba 

Its unclear from your task description, but maybe it will be enough just to create relationships between tables?

you could provide your input data and desired output in order to help you more quality

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi, The relationship only is not enouh the slicer shows all countries.

I figured it out by adding the following column:

CountryName = RELATED('Country Code'[Country])

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.