cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jjasper
Level: Powered On

Filtering and groupby for a drop down

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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filtering and groupby for a drop down

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Filtering and groupby for a drop down

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jjasper
Level: Powered On

Re: Filtering and groupby for a drop down

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

Community Support Team
Community Support Team

Re: Filtering and groupby for a drop down

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,537)