Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Formula to Filter Out "Completed" Items in Gallery

(0) ShareShare
ReportReport
Posted on by 10
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)
  • WarrenBelz Profile Picture
    147,809 Most Valuable Professional on at
    Formula to Filter Out "Completed" Items in Gallery
    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.
  • CU10061933-0 Profile Picture
    10 on at
    Formula to Filter Out "Completed" Items in Gallery
    Thank you!  @'s formula worked as well, but I went with @  because it was simpler.
  • Verified answer
    WarrenBelz Profile Picture
    147,809 Most Valuable Professional on at
    Formula to Filter Out "Completed" Items in Gallery
    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    Buy me a coffee
  • Verified answer
    MooseBot88 Profile Picture
    167 on at
    Formula to Filter Out "Completed" Items in Gallery
    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

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >