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 / 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,969 Moderator 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard