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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Sequential selections:Returning results in a table depending on the selection in another table

Hi all!

 

I'm working on a report which has information about cities. I'd like to make the user fill the data in an ordered way (so he would first have to choose a continent in a slicer, then choose a country in a table and, finally, get the data for the cities in that country). Unfortunately, when I choose a continent, both tables countries and cities are automatically filled up. 

These are my tables:

 

Continents:

continent_idcontinent_name
1Europe
2America

 

Countries:

country_idcontinent_namecontinent_id
1France1
2Spain1
3USA2
4Argentina2

 

Cities:

city_idcity_namecountry_idpopulation
1Paris12,1
2Madrid23,2
3San Francisco30,8
4Buenos Aires42,8
5Lyon10,5



I'd like to get a dashboard with a slicer for continent and two tables (for country and cities):

  • The first slicer would contain the continent names. If no continent is selected, tables country and cities should remain empty
  • If a continent is selected, the first table should show data to choose a country. The second table should remain empty. 
  • Finally, if a country is selected, the cities information will appear in the table cities. If I select a city in the table, the slicer and the table  with country information should keep their relationships

 

Could you indicate me how to make this "ordered" selection? I'm struggling with this and haven't found any solution  😞

 

Regards

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

Hi @Anonymous ,

 

Based on my understanding,you only need 2 measures as below:

Measure = IF(ISFILTERED('Continents'[continent_name]),"choose a country",BLANK())
Measure 2 = 
var _table=CALCULATETABLE(VALUES(Countries[country_name]),FILTER(ALL(Countries),'Countries'[continent_id]=SELECTEDVALUE(Continents[continent_id])))
Return
IF(MAX('Countries'[country_name]) in _table,MAX('Countries'[country_name]),BLANK())

Then create a relationship as below:

Screenshot 2020-11-16 104702.png

And you will see:

Screenshot 2020-11-16 104758.pngScreenshot 2020-11-16 104813.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on my understanding,you only need 2 measures as below:

Measure = IF(ISFILTERED('Continents'[continent_name]),"choose a country",BLANK())
Measure 2 = 
var _table=CALCULATETABLE(VALUES(Countries[country_name]),FILTER(ALL(Countries),'Countries'[continent_id]=SELECTEDVALUE(Continents[continent_id])))
Return
IF(MAX('Countries'[country_name]) in _table,MAX('Countries'[country_name]),BLANK())

Then create a relationship as below:

Screenshot 2020-11-16 104702.png

And you will see:

Screenshot 2020-11-16 104758.pngScreenshot 2020-11-16 104813.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors