web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / ODATA Query Filter ver...
Power Automate
Answered

ODATA Query Filter versus Condition + Apply to each

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all, 

 

I have a general question about Flow performance. 

I'm new to ODATA, but I've been working with Flow for a while. 

 

I have a library with 600+ documents and steadily increasing. 

If I need to build a recurring flow to check on documents that are "expired" based on a date or text column, would it be better in terms of performance to build a "Get file properties" in an apply to each with a condition, or to build an ODATA guery filter in terms of performance?

I did try a condition-based flow and noticed it was extremely slow, but I haven't successfully managed to try an ODATA query yet (having issues with dates). Just wondering if it is worth it, or if it will be the same performance?

 

Thanks!

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    performance wise ODATA will beat out anything you do in flow (assuming the database is on is a sufficiently powerful server or you are querying a microsoft service like sharepoint, or Dynamics/CDS)


    In flow you can utilize the Filter data operation action (rather than a conditional for-each) which still wont beat out an ODATA query..but usually takes a second max

  • Verified answer
    v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    When there are mounting items in your list, it would be better to use Odata filter query to return the needed items. Otherwise, you will have to filter with each item with a Condition and which will be very slow.

     

    What’s the issue you are having with date column?

     

    When using Odata filter query with Date column, I would suggest you use a custom date column with date only format, but not the default date column such as Created/Modified.

     

    Say I have a date column called Date, I want to filter out items that Date equals to today. I will use the following code:

    Date eq ‘formatDateTime(utcnow(),’yyyy-MM-dd’)’

    1.PNG

     

    Please check this doc for more details:

    https://docs.microsoft.com/en-us/previous-versions/dynamicsnav-2016/hh169248(v=nav.90)

     

     

    Best regards,

    Mabel Mao

  • GabrielStJohn Profile Picture
    Microsoft Employee on at

    Hello, @Anonymous!

     

    Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-yamao-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!


    Thank you for being an active member of the Flow Community!

     

    -Gabriel
    Flow Community Manager

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Mabel, 

    No matter what I do I always get "The Expression \"Date eq 2018-10-10\" is not valid. 

     

    I've tried using all kinds of different columns. I've used text custom date columns, and I've used the out of the box "Created" and "Modified" dates. 

     

    See my error below:Odata_query1.pngodata query2.png

  • MarkStokes Profile Picture
    561 on at
    You need to wrap single quotes around your date string: Date eq ‘2018-10-09’

    -Mark
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Wow.

    Sometimes I surprise even myself with my own stupidity. 

    Thanks Mark, that worked. (Obviously)

  • MarkStokes Profile Picture
    561 on at
    We have all been there!

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!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard