web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering for Cascadin...
Power Apps
Answered

Filtering for Cascading Drop Down

(0) ShareShare
ReportReport
Posted on by 74

In a PowerApp application I have a form based on a SharePoint list. On that form are two comboboxes, one to select a U.S. state and one for U.S. counties. In the associated SharePoint list the State column is a choice column, and the Counties column is a lookup column which connects to another SharePoint list that contains all of the counties in Alaska, Idaho, Oregon, and Washington in one column and their associated state in another. I would like to have the counties combobox filter based on the state that is selected in the state combobox. This code, placed on the Items parameter of the Counties combobox has gotten me part of the way there.

 

Filter(Choices([@Subrecipients].County), Value in Filter(Counties, State = StateField.Selected.Value).Title)

 

The issue I'm having is that I'm getting duplicate values for states that each have a county of the same name. For example, both Washington and Idaho have a Jefferson county. Hence, Jefferson shows up twice in the filtered Counties combobox.

Any ideas what might be going on here?

Categories:
I have the same question (0)
  • IsabellaFranco Profile Picture
    44 on at

    I think that GroupBy will work. See this: GroupBy and Ungroup functions in Power Apps - Power Platform | Microsoft Learn

    In fact, I ended up here because I was looking for the Filter function, I think that this version of powerapps has a problem with the filter function, because my results are not displayed to users when I use the filter. Let me know if you are also having this problem.

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    @automan25,

     

    You could check whether the Id field is in the .ID array instead of checking for name. Since name is not unique, both the example of Washington and Idaho will return true to your Filter condition causing duplicates. Working with the unique ID will prevent this:

     

    Filter(
     Choices([@Subrecipients].County), 
     Id in Filter(Counties, State = StateField.Selected.Value).ID
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • automan25 Profile Picture
    74 on at

    That did the trick. Thanks so much! A second set of eyes so often helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 977

#2
Valantis Profile Picture

Valantis 664

#3
11manish Profile Picture

11manish 530

Last 30 days Overall leaderboard