web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Filter on Multi...
Power Apps
Suggested Answer

How to Filter on Multiple Conditions

(1) ShareShare
ReportReport
Posted on by 5
Hello,
 
I have been creating an app in Power Apps, and I want the gallery to filter based on 3 conditions. These are: whatever is typed into the search bar based on Title, whatever is typed into the search bar based on Short Description, and whatever items are currently in the "Completed Stage":
 
 
The filter is tied to a button that is set to make its corresponding variable (StageFilt) true On Select:
 
 
So the basic path of the logic goes: Click "Show Completed" Button -> Set StageFilt to true -> If StageFilt is true, Filter Gallery by Stage Value = "Completed".
 
But right now, nothing happens when I click the button. I am not sure if Power Apps isn't working correctly, or the other filtering conditions are just causing conflicts, but based on the information I've been looking at the formula I currently have should be working.
 
If I'm missing something, I would greatly appreciate to know what that would be. Thank you!
 

 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi
     
    Thank you for the pictures.
     
    A couple of things
     
    • To me you have the filter written completely different than what you are saying and there are details you haven't provided.
    • You are using OR,s not Ands but you talk as if the things should be and'd together. So is it based on Ors or ands?
    • If that is in your items, I don't get what the button does, like exactly.
     
    So the basic path of the logic goes: Click "Show Completed" Button -> Set StageFilt to true -> If StageFilt is true, Filter Gallery by Stage Value = "Completed".
     
    Yeah I am totally lost, you have multiple filters in your items, but here you talk like its a single thing, so again I am not following at all.
     
    To me essentially you wanted
     
    If(!IsBlank(TextBox1), filter with a startswith
    and
    If!IsBlank(SecondTextBox1), filter with a startswith
    and
    if Stage = completed
     
    but I see no code that actually updates the Stage to Completed
    and even if I did, how does Stages and Features match up. I would expect something like
     
    If(LookUp(Stages, FeatureRequestId = ThisItem.Id).Value = "XXXX")
     
    Sorry I am trying but am lost.
     
     
     
     
     
     
  • nirace Profile Picture
    9 on at
    Hi,
     
    I don't understand the issue but here's how I would debug.
     
    I will get a gallery then:
     
    1. Just keep source - Check if data loads up
    2. Keep the first filter - Check if data loads up
    3. Add the second filter - Check if data loads up
    4. Add the fourth filter - Check if data loads up
    5. Add the sort - Check if data loads up
     
    For the stageFlit flag,
     
    I would keep If outside filter rather than inside.
     
    If(stagefilt, Filter(Datasource, Stage.Value="Completed", Condition2, Condition3..), Filter(Datasource, Stage.Value="Something", Condition2, Condition3..)).

    Thank you. 
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard