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 Automate / Filter Query - Multipl...
Power Automate
Answered

Filter Query - Multiple Conditions

(1) ShareShare
ReportReport
Posted on by 56
I don't know what I'm doing wrong here, but any help would be amazing. 
 
I'm currently creating a flow, pulling from a SharePoint list of qualifications and their expiry date - in the filter query I have it set as per the below:
 
 
The add days is taking the expiry date and adding 60 days to it. I entered some dummy data to test, and my issue is with the last part of the qury; renewal in progress. This one is meant to be ignored if the value is 1 (it's a yes/no box) which in my deo, it is - but it's also set to only be flagged tomorrow. The issue I'm running into is that it's ignoring the the renewal in progress AND when there's something else in there that's expiring, it'll appear as per below:
 
 
 
The highlighted one is the one that 1: should not have come through as 'renewal in progress' is selected as yes, and 2: it isn't 60 days until it's due to expire until tomorrow. Is is a case of simply moving this part of the filter to be the first instance and not the last? Or do I need to reword it? 
 
 
Again, any input would be valuable. 
Categories:
I have the same question (0)
  • Verified answer
    BabyBots Profile Picture
    243 on at
    From what you're describing, the issue seems to be with how the logic is grouped in your OData filter query. Specifically:
    It's pulling records where RenewalInProgress = 1 even when the expiry is not 60+ days out.
    That likely means the OR conditions are taking priority over your final AND clause, which can definitely happen when parentheses aren’t used to group things clearly. Unfortunately, the SharePoint connector’s OData syntax doesn’t support parentheses directly — which makes compound logic like this really tricky.
    A couple of suggestions:
    1. Break your logic into two steps:
    Instead of trying to catch everything in one big Filter Query, try this:
    • In the Get items, just pull everything that's within the 60-day expiry range.
    • After that, use a “Filter array” action to apply the RenewalInProgress != 1 condition after the data is pulled in. This gives you more flexibility and easier-to-read logic.
    2. Alternative: Flip the logic to exclude early
    If you want to stick with OData filtering, try making the RenewalInProgress ne 1 the first clause, so it’s always evaluated first:
    RenewalInProgress ne 1 and (ExpiryDate eq addDays(...) or ExpiryDate eq addDays(...) or ...)

    This way, anything marked as “In Progress” gets filtered out before any of the expiry date logic is applied.
     

    🚀 Automate. Optimize. Innovate. 🚀

    Helping businesses streamline workflows and maximize efficiency with Microsoft Power Platform. Let’s transform your processes and unlock new possibilities!

    Explore BabyBots.ai
  • smather Profile Picture
    56 on at
    Thank you @BabyBots! I moved it to the top, and used ne rather than eq as per your recc and it seems to be working now!

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard