cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

2 dropdown boxes. Then user searches table to return matches. HELP

Hi all, 

 

I need to search this table to return a 'Name' result, 

 

I have 2 dropdowns: 

1.) User chooses category (NPI, Brand management etc)

2.) User chooses Yes or No

 

Then I would like to search to return all 'names' that the dropdowns satisfy.

 

Thanks for the help 🙂 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Oh, the formula is going to be a bit different because I thought that your different categories where in a column named 'Category'. Since you have different columns on each category, you'll have to filter differently.

You'll kind of want to do something like this, where you check on the column name which is selected in the first dropdown where the value matches that of the selected in the second dropdown.

 

Filter(DATASCOURCE_TABLE, DropDown1.Selected.Category = DropDown2.Selected.Choice).Name

 Although I'm not sure this will work for finding the correct column name, because the selected item might not be recognized as a valid parameter.

 

The difficult part is that on the categories you search, they actually are column names and not integral data on which to filter the data. If above code does not work, you'll have to find a way to get the columnname that matches the dropdown, on which you're then going to filter your data.

View solution in original post

3 REPLIES 3
SkiDK
Solution Sage
Solution Sage

 Hey @Anonymous 

 

Filter(DATASCOURCE_TABLE, Category = DropDown1.Selected.Category && Choice = DropDown2.Selected.Choice).Name

 

This would be a standard formula to lookup record in a table with conditions. I named the column name of the first Dropdown 'Category' and the second 'Choice'.

 

I'm not sure what you mean with Yes or No, but I suppose it's a column as well?

Anonymous
Not applicable

Hi @SkiDK 

Thank you for the help 🙂

 

For example: The user will select a 'category' (GTM, brandbuilding etc) in dropdown1 (these are column names on my excel table) and also the user will select either 'yes' or 'no' from dropdown2. I then need to search the table returning names that match the search. 

 

NameGTM Brand Building Brand ManagementNPI
ChrisYesNoYesNo
AdamYesYesYesNo
SteveYesNoNoNo
JohnNoNoYesYes

 

 

Oh, the formula is going to be a bit different because I thought that your different categories where in a column named 'Category'. Since you have different columns on each category, you'll have to filter differently.

You'll kind of want to do something like this, where you check on the column name which is selected in the first dropdown where the value matches that of the selected in the second dropdown.

 

Filter(DATASCOURCE_TABLE, DropDown1.Selected.Category = DropDown2.Selected.Choice).Name

 Although I'm not sure this will work for finding the correct column name, because the selected item might not be recognized as a valid parameter.

 

The difficult part is that on the categories you search, they actually are column names and not integral data on which to filter the data. If above code does not work, you'll have to find a way to get the columnname that matches the dropdown, on which you're then going to filter your data.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,299)