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 and groupby ...
Power Apps
Answered

Filtering and groupby for a drop down

(0) ShareShare
ReportReport
Posted on by 97

Hello everyone,

 

I am trying to group a dropdown then from there filter another dropdown that will filter the gallery. I have the dropdown that will filter the gallery all set up and is filtering the gallery.

 

My hang up is because I have 19 sites that collect for the same indicators based on what their continuum is... they are multiple records for the indicators column and for the setting column. So to explain this better I want to create a dropdwon that only shows if it is RH or LTC then when they select RH or LTC the second dropdown will be filter to show the indicators that are either for RH or LTC. In my table each indicator is given a RH or LTC so I can filter this way. Because there is 19 sites the setting column is showing RH for every record that has an RH in the setting column, I would like to group this show that only one RH or LTC shows not multiple. Then on the second dropdown I want the indicators to show only once instead of multiple of each indicator.

 

I hope this makes sense.

 

TIA

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    HI @jjasper ,

    Do you only want the first Dropdown to show unique setting column value (RH or LTC) rather than repeated values?

     

    Based on the needs that you mentioned, I think the GroupBy function or Distinct function both could achieve your needs.

    I have made a test on my side, please take a try with the following worlaround:

    Set the Items property of the first Dropdown to following:

    GroupBy('YourDataSource', "SettingColumn", "GroupData")

    then display the SettingColumn value within the Dropdown control.

     

    Or

    Set the Items property of the first Dropdown to following:

    Distinct('YourDataSource', SettingColumn)

    More details about GroupBy function and Distinct function in PowerApps, please check the following article:

    GroupBy function and Distinct function

     

    Best regards,

  • jjasper Profile Picture
    97 on at

    Awesome thanks that work perfect! Now how to do I do same thing with the other drop but keep it filtered based on if the indicators are for LTC or RH? I only want the drop down to show unique indicators rather than repeated values. I am not sure if I can do distinct and filter together or I need to groupby and filter?

     

    TIA

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @jjasper ,

    Do you want to filter your second Dropdown based on the selected value within your first Dropdown box?

    I have made a test on my side, please take a try with the following workaround:

    Set the Items property of the first Dropdown (FirstDropdown) to following:

    Distinct('YourDataSource', SettingColumn)

    Set the Items property of your second Dropdown box to following:

    Distinct(
     Filter('YourDataSource', SettingColumn = FirstDropdown.Selected.Value),
     IndicatorsColumn
    )

    Please take a try with above solution, check if your issue is solved.

     

    If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

     

    Best regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard