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 / Formula to Filter Out ...
Power Apps
Answered

Formula to Filter Out "Completed" Items in Gallery

(0) ShareShare
ReportReport
Posted on by 12
I have an app with a gallery where I want to show only items that meet the following criteria:
- Name of logged in user is = to value in "Created By" column
or
-Name of logged in user is = to value in "Assigned To" column
and
- Value of "EWO Status" column is = to anything other than "Completed"
 
I got the first two filters to work, but when I try to add the third filter, it does not work (completed items are still showing.)
 
Here is my current formula:
Filter('EWO System','EWO Status'.Value <> "Completed" And 'Assigned To'.Email=varUserEmail Or 'Created By'.Email=varUserEmail)
 
Here is what this formula is currently getting me:
 
What edits do I need to make to the formula to get this to work?  (EWO Status is a choice column btw)
Categories:
I have the same question (0)
  • Verified answer
    MooseBot88 Profile Picture
    168 on at
    Try this....
     
    Filter('EWO System','EWO Status'.Value <> "Completed" And ('Assigned To'.Email=varUserEmail Or 'Created By'.Email=varUserEmail))
    I think it's where your have an And and a Or statement without separating them. 
     
    --------------------------------------------------------------------------------
    If this helps, let me know. If you want to buymeacoffee.com/moosebot88
  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    You have two issues here - one is the requirement for And/Or seperation, but the other potential problem is that <> (not equals) is not Delegable. I will give two possibilities - if the records created by or assigning to the user will never be more than 500 (you can increase this to 2,000)
    With(
       {
          _Data:
          Filter(
             'EWO System',
             'Assigned To'.Email = varUserEmail Or 'Created By'.Email = varUserEmail
          )
       },
       Filter(
          _Data,
          'EWO Status'.Value <> "Completed" 
       )
    )
    However you can make the whole filter Delegable by selecting all the other values other than "Completed" - example below
    Filter(
       'EWO System',
       'Assigned To'.Email = varUserEmail Or 'Created By'.Email = varUserEmail,
       'EWO Status'.Value = "In Progress" Or 'EWO Status'.Value = "Submitted" Or 'EWO Status'.Value = "Pending"
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • CU10061933-0 Profile Picture
    12 on at
    Thank you!  @'s formula worked as well, but I went with @  because it was simpler.
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    Yes, but assuming you are using SharePoint (you did not state your data source) @MooseBot88's example is not Delegable and will mislead future readers of this post. Mine is complex only for that reason.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard