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 Apps
Unanswered

Multiple Filters

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have trying to add drop down boxs to filter gallery data.  I have 10 filters.  It relates to vehicles, I want users to be able to select Make and then model and so on.  I do not want the selections to be dependent on each other, for eample users might want to see how many of the makes are have a manual or auto gear box.

 

I have entered the following into the drop down boxes, changing the search referenece for each one of the 10 seach areas. 

 

SortByColumns(Distinct(Table1_1, MAKE), "Result").

 

What I can't figure out is what formula to put in the gallery to make these drop down boxes work.

 

Thx

Categories:
I have the same question (0)
  • Meneghino Profile Picture
    6,949 on at

    Hi @Anonymous

     

    You need to modify the Items property of the gallery.

    This needs to be something like this:

     

    Filter(Table1_1, Make=DropdownMake.Selected.Result, Model=DropdownModel.Selected.Result, etc. etc.)

     

    Where you need to use the actual names of your controls (i.e. dropdowns)

     

    Please let me know how you get on.

     

    As soon as you do this you will realise that you have no way to deselect an option (i.e. show all cars of a particular make, either manual or automatic).  For this you need the ability to disable a dropdown.  This can be done, and there should be a few posts on this in the forum.  If not, please come back)

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thx for your help.

     

    Entered as instructed.  My gallery went blank.  When I tried it just with Make:

     

    Filter(Table1_1, Make=DropdownMake.Selected.Result) and not MODL it does filter on Make.

     

    Drop down settings.

    I have ON CHNAGE set to UpdateContext({variable2: DropdownMODL.Selected.Value})

    and Item 

    and ITEM set to SortByColumns(Distinct(Table1_1, MODL), "Result")

     

    Same as MAKE.

     

    Model is actually labelled as MODL on my data source 

  • Meneghino Profile Picture
    6,949 on at

    Hi @Anonymous

     

    In PowerApps there is no longer the need to use the OnChange for Dropdowns, unless you want something special.  All data that depends on the selected Item is updated automatically.

     

    All you need is to correctly set the Items property of the gallery.

     

    Also, please remember that PowerApps is case sensitive, so Make is not the same as MAKE.

     

    In any case, to find out where the error is you can do the following:

    1) Try to set the Items property of the gallery to:

    Filter(Table1_1, MAKE="Ford")

    2) Create a label anywhere on the screen outside the gallery and set its Text property to:

    DropdownMake.Selected.Result

    and then see it change as you change the selection in the dropdown, without the need for any OnChange action

     

    Once the above two work, then you can set the correct syntax in the Items property.

     

    Please let me know.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have taken out all the on change instructions and the make filter stills works.  Still getting a blank screen when I try to add MODL.

     

    Filter(Table1_1, Make=DropdownMake.Selected.Result, MODL=DropdownMODL.Selected.Result)

     

    The strange thing is when I loaded up the app before I took out on chnage instructions the app started filtering by MODL.  It was not doing it on the creating page.  Went back into app after I saved it and it stopped doing it.

     

    When the MODL filter was functioning it brought up all model from all makes rather than just for the make selected in the first dropdown.  Is there a way of changing this?

     

    Thx, sorry for all the questions. I am new to this but am so close to creating and app that will change the way our department operates 

  • nickduxfield Profile Picture
    497 on at
    Filter(Table1_1, Make=DropdownMake.Selected.Result, Model=DropdownModel.Selected.Result, etc. etc.)

     try || in place of the ,

  • Nikhil2 Profile Picture
    522 on at

    Hello,

     

    Could anyone help me on this issue, Below is the powerapp which i am using to filter the gallery(documents) from the sharepoint library.

     

    I have tried with many filter possibilites but it works either ways but i am looking for 2 sort of filters at a same time and also to download the multiple documents using checkbox. Before filtering user should be able to all the documents. Then as per filter the gallery should work.Capture11.PNGCapture12.PNG

     

    1. Is it possible to filter the gallery by selecting values from the dropdown individually, For Ex: if i select training level and as a option "anything", i need to see or filter only training level documents which was defined in the sharepoint doc library and same way goes to all the dropdown Independent or as a one by one. Well i am using Distinct(Table,Column name) for the all the drop downs to fetch the values. The more the filter goes, the gallery should start with filter dynamically.

     

    2. Second approch, If i set values to all the dropdowns according to the selection i need see the results in the gallery.

     

    3. There is a displaymode set to the below 3 dropdowns, i have value in training level when i select "-" other two dropdowns will be invalid.

     

    To Add on, For example:

     

    4. This has to work like actual filter, When i select Training level "-" the result should pop up in gallery and show all documents which there under "-". And when actual filter applies to all the dropdowns it should provide the result.

    5. And when i select Training level "-" and Application "Any Option" it should filter matching the variables and it should keep filtering accordingly. As many as filter if i apply it should provide the matching documents.

    6. On Items for gallery, like i said it works either ways(since i am using "And"/"Or"). So it is either working for "And" otherwise "Or " Sort(Filter('Test Document',And(Training_x0020_Level=Dropdown1.Selected.Value,Application.Value=Dropdown2.Selected.Value,Package.Value=Dropdown3.Selected.Value,Language.Value=Dropdown4.Selected.Value,Medium.Value=Dropdown5.Selected.Value)),Modified,Descending). In my case it should work for both

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have the same issues. Did you find a solution?

  • Nikhil2 Profile Picture
    522 on at

    Hello NikoClau,

     

    What is the issue, can you brief on the problem? if the problem is the same for the multiple filters.

     

    I would recommend to use the below code.

     

    Filter(Datasource, if(isblank(dropdown.selected.value),true, columnname=dropdown.selected.value) && if(isblank(dropdown1.selected.value),true, columnname=dropdown1.selected.value))

     

    This helps you to filter multiple dropdowns at the same time, if nothing is selected(blank) all your outputs will be returned.

     

    Let me know if this works.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard