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 / Filter table with two ...
Power Apps
Unanswered

Filter table with two conditions, same column not working

(1) ShareShare
ReportReport
Posted on by 80

I have a simple app that displays a sharepoint list in a table. I have a column in the list with the name "Title". I want to display the table filtered on if the title contains the word "Approved" or "Waiting". 

tpcolson_0-1715391314089.png

Filter('Online GIS User Account Request List', !IsMatch(Title, "approved", MatchOptions.Contains))

Works when it's one condition. 

tpcolson_1-1715391363791.png

Filter('Online GIS User Account Request List', !IsMatch(Title, "approved", MatchOptions.Contains) or !IsMatch(Title, "waiting", MatchOptions.Contains))

Does not work when I add the second condition with or

 

 

 

 

Categories:
I have the same question (0)
  • Meekou Profile Picture
    on at

    Could you check for the single condition you real get expected data?

    Based on your requirement, you want to filter based on approve and waiting, but you add ! before ismatch, and for your second conditon, you should use "Or" instead of "or".

    Here is a sample demo:

     

    ClearCollect(
     SampleData,
     {
     Id: 1,
     Title: "Approved"
     },
     {
     Id: 2,
     Title: "Pending"
     },
     {
     Id: 3,
     Title: "Waiting"
     }
    );
    ClearCollect(
     FilterSampleData,
     Filter(
     SampleData,
     IsMatch(
     Title,
     "Approved",
     MatchOptions.Contains
     ) Or IsMatch(
     Title,
     "Waiting",
     MatchOptions.Contains
     )
     )
    );

     

  • Verified answer
    iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    In your example. it looks like you actually want it to only show items where the Title is neither "approved" nor "waiting", so using Or won't get you that as they both allow each other - i.e. if the Title is not approved then it could be waiting or if the Title is not waiting then it could be approved - but what you want (I think) is that neither of the two appear in your datatable.

     

    Filter(
     'Online GIS User Account Request List', 
     !("approved" in Title)
     And
     !("waiting" in Title)
    )

     

    It's worth noting that this formula is not delegable though so it won't work once you are over 2000 items - so can I ask, is your Title equal to "approved" or is there other text inside the Title field? If not, and you have a limited set of potential Title values, then I would suggest using explicit references to the other possible Title names, as this is scalable and will work no matter how many options you add to it:

    Filter(
     'Online GIS User Account Request List', 
     Title="Under Review"
     Or
     Title="With Administrator"
     Or
     Title="Denied"
     Or
     Title="Rejected"
    )

     

    Cheers,

    Sancho

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 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard