Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Triggers
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
  • Get help with flow
Menu

Why you should use filter instead of condition in Power Automate

Posted on September 6, 2020January 6, 2022 by Tom

Does your Power Automate flow use condition to process all the items instead of a filter to get only the relevant ones?

Does it take very long for the flow to finish?


It could be any Power Automate flow that should process only small amount of the items in your list or library. Some reminder sending flow, or archiving flow. You get all items in a list and then use a condition to decide if the item should be processed or not.

The flow is probably working fine (even if it’s taking a while to finish). Until you realize that it’s not really doing what you expect. You open the flow run history to find the problem, and you see this:

…hundreds, maybe even thousands of items entering the condition. You wanted to process only 5 or 10 or 20 out of these, all the others end in the If no branch. How do you find the ones that fit the condition? Unless you really enjoy clicking your mouse, you won’t.

But you don’t have to, if you reduce the number of processed items via Filter Query in the Get items / Get files action. For example, you can filter only items with today’s deadline.

…and instead of hundreds of items to loop through, you’ll get only the relevant ones. Minutes of runtime will be reduced to seconds. You’ll save a ton of mouse clicks (and time) during testing and debugging.

You can filter using date columns, Yes/No (boolean) columns, person or group columns, text columns, choice columns, number columns… You can even filter by a pattern in one of the columns (e.g. file type).

There’re a few exceptions though. The calculated columns and multiple lines of text columns will not work in the Filter Query. Other than that it’s always much better to use Filter Query instead of a ‘Condition’ in Power Automate.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Do you know what to do, but not how to do it?

Get The Ultimate Power Automate expressions cheat sheet and translate your thoughts into flows with ease!


NEW! Master the HTTP requests to SharePoint with a new cheat sheet!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Use Power Automate to forward Outlook events upon registrationJanuary 29, 2023
  • Why the condition is false for the same numbers (Power Automate)January 25, 2023
  • How to forward event invitation to other calendar (Power Automate)January 22, 2023
  • Run ‘For selected item’ flow from non-default environment (Power Automate)January 18, 2023
  • Hide button in SharePoint list after Power Automate flow startedJanuary 15, 2023

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2023 Let's POWER Automate | Theme by SuperbThemes