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 / My gallery filter is n...
Power Apps
Answered

My gallery filter is not working

(0) ShareShare
ReportReport
Posted on by 143

Hello
I want to filter a gallery with 2 drop-down list boxes
My first contains:

Sort(Distinct('Produits entretien';'PRODUIT PROPOSÉ ');Result;Ascending)

my 2nd:

colCategorie

My collection in onstart : 

Collect(colCategorie;Distinct('Produits entretien';Categorie))

And the item code of my gallery

If(IsBlank(cbxCategorie.Selected.Result);If(IsBlank(cbxProduitProp.Selected.Result);'Produits entretien';Filter('Produits entretien';cbxProduitProp.Selected.Result = 'PRODUIT PROPOSÉ '));Filter(If(IsBlank(cbxProduitProp.Selected.Result);'Produits entretien';Filter('Produits entretien';cbxProduitProp.Selected.Result = 'PRODUIT PROPOSÉ '));cbxCategorie.Selected.Result = Categorie))

 But powerapps reports me an error and so it doesn't work
I don't understand

Categories:
  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @Fa1con74 ,

    The below will only work properly in the Items of your gallery if the top filter returns record numbers under your (500-2,000) Delegation limit as the in filter is not Delegable.

    With(
     {
     wList:
     Filter(
     'Produits entretien';
     Len(cbxProduitProp.Selected.Result) = 0 || 'PRODUIT PROPOSÉ ' = cbxProduitProp.Selected.Result
     )
     };
     Filter(
     wList,
     Len(cbxProduitProp.Selected.Result) = 0 || cbxCategorie.Selected.Result in Categorie
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Fa1con74 Profile Picture
    143 on at

    Thank you unfortunately it does not work, powerapps reports me an error in the formula

    Fa1con74_0-1641640188307.png

     

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    @Fa1con74 ,

    Fixed typo in post - I thought you might have picked that up as it is standard Filter syntax.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Fa1con74 Profile Picture
    143 on at

    Hi @WarrenBelz ,

    Indeed I really suck and I'm sorry.
    On the other hand it still does not work and there is always an error and I allow myself to turn to you again
    Thank you

    Fa1con74_0-1641704242361.png

     

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    @Fa1con74 ,

    That was not a criticism - this forum is called from the Learn icon for a reason and I am trying to guide you to understand your code so you can apply it in the future. The same goes here - strangely it did not error on the first post as it is a second typo of mine (comes from free-typing code without red lines to guide). I have fixed that one, but remember I cannot see your data structure or app, so can only rely on the values you post.

    With(
     {
     wList:
     Filter(
     'Produits entretien';
     Len(cbxProduitProp.Selected.Result) = 0 || 'PRODUIT PROPOSÉ ' = cbxProduitProp.Selected.Result
     )
     };
     Filter(
     wList,
     Len(cbxProduitProp.Selected.Result) = 0 || cbxCategorie.Selected.Result in Categorie
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @Fa1con74 ,

    Have you tried the updated code?

  • Fa1con74 Profile Picture
    143 on at

    Hello, yes and there is still an error and it does not work as you can see on the screenshots

    Fa1con74_1-1641964491447.png

     

    Fa1con74_0-1641964448105.png

     

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    @Fa1con74 ,

    What type of field is Categorie?

  • Fa1con74 Profile Picture
    143 on at

    In my sharepoint list it is a choice column

    Fa1con74_0-1641965470846.png

     

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    @Fa1con74 ,

    Then you need

    cbxCategorie.Selected.Result in Categorie.Value

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
timl Profile Picture

timl 122 Super User 2026 Season 2

Last 30 days Overall leaderboard