I have a Table in Power Apps with multiple columns of location data. Screenshot below is an example from an Excel file, formatted the same way. I want to have three ComboBoxes (Country, State/Province, and City), each showing only distinct values and with the selection of the first filtering the available options of the next level down.
Data Table Screenshot
The Country ComboBox should only show two rows – United States and Canada, not one for each entry in the dataset. This is working correctly, and here is the code I have in the Items propety:
Sort(Distinct(‘Dim Table Locations’, Country),Value,SortOrder.Ascending)
As an example – If I select Canada from the Country ComboBox, the State/Province ComboBox should then show one entry each for Ontario, Alberta, and British Columbia. But when I make a selection in the Country ComboBox, the State/Province ComboBox is blank. Here is the code I have for State/Province:
Filter(Sort(Distinct(‘Dim Table Locations’, State/Province),Value,SortOrder.Ascending), Value = Combo_Country.Selected.Value)
Could anyone please help with resolving this? Let me know if I have not provided enough context – thanks!
Nathan Enix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.