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

Nested Filter and Distinct for Dropdown based on criteria

Capture11.JPGCapture 1
Hi all,

Lets say I have data in excel table as picture "Capture 1" above. I would like to create a dropdown list which:

  • Based on "Equipment" Column where "Status" is "Returned"
  • Filter out repeated "Equipment" name

Which mean for this case the dropdown should show:

  • Notebook2
  • Projector1
  • Projector2
  • Projector3

The way i figured out was to get list of "Loaned out" Equipment, then filter the filtered "Loaned out" list from entire "Equipment"


I've tried this:

Distinct(Filter(Table1,Distinct(Filter(Table1,Status="Loaned out"),Equipment)),Equipment)

which returns error.

 

Is there any other way on getting this done?

 

Thank you in advanced.

3 REPLIES 3
Community Support Team
Community Support Team

Re: Nested Filter and Distinct for Dropdown based on criteria

Hi Chongzh86,

 

I have created a similar Excel table with you. A screenshot looks like below:

1.png

 

Then I created an app based on this table. Hope my steps could be a reference for you:
1. Add a connection from PowerApps to Excel table
2. Add Drop down control1, set its Items property as: Distinct(Table1,Status)
3. Add Drop down control2, set its Items property as: Distinct(Filter(Table1,Status=Dropdow1.Selected.Value),Equipment)
4. Then when I select the status “LoanedOut” on Drop down1, all the relevant equipment will be shown on Drop down2.

 

Please feel free reply if you need more help.

 

Best regards,
Mabel Mao

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

Re: Nested Filter and Distinct for Dropdown based on criteria

Hi Mabel Mao,

 

First of all, would like to thank you for your reply.

Please allow me to clarify my situation. The usage of my App is for IT equipment loaning. which user can check which equipment is available, and book it.

Capture11.JPGCapture 1

Refering back to my table, I can actually hard code the status. Understand that:

 

Distinct(Filter(Table1, Status="Loaned out"), Equipment)

Can return result listing below in red:

 

  • Notebook1
  • Notebook3

Lets Call the results in red "List A".

 

Just because they're being "Loaned out", means they are no longer available, so I don't wish them to be listed within the dropdown.

 

So is there any way to get DropDown to list "Returned" Equipments with result in "List A" excluded?

 

As:

Distinct(Filter(Table1, Status="Returned"), Equipment)

will still showing Notebook1 and Notebook3 within the selection list.

 

Thank you, and sorry for the trouble

 

BenAVConecpts
Level: Power Up

Re: Nested Filter and Distinct for Dropdown based on criteria

This worked for me with a similar problem I was having, so thank you!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,693)