Filter Array and Select Instead of Apply to Each in Power Automate

Filter Array and Select replace Apply to Each for filtering and reshaping arrays and run noticeably faster.

When a cloud flow needs to go through an array, many people automatically reach for the Apply to Each action. For simple cases that's perfectly fine, but as soon as it's just about filtering an array or changing the shape of its objects, it's worth looking at two alternatives from the Data Operations category: Filter Array and Select. Both accomplish exactly this task in a single step, without the flow having to run through each element individually.

This article shows how the two actions work, where they meaningfully replace Apply to Each, and where a loop still remains the right choice. For the limits of Apply to Each itself, for example with very large arrays and Power Automate's action limits, you can find more in the article on Power Automate Action Limits.

Why Apply to Each Is Often the Detour for Filtering and Reshaping

Apply to Each runs the actions it contains for every single element of an array. With 200 orders and two actions inside the loop body, that's 400 individual executions, all of which count against your flow's action limit and are logged individually in the flow history. If the goal is only to filter out certain elements or rename fields, this overhead arises for no real reason, because that's exactly what the Data Operations are for. Microsoft describes it this way in its own guidance: consider using a filter or select operation instead of a condition in a loop to find items in a table that meet certain criteria, an approach that can simplify the cloud flow and improve performance, as stated in the official overview of Data Operations in Power Automate. Filter Array and Select each run as a single action, regardless of whether the array contains five or five thousand entries.

The Filter Array Action: Building a Subset Without Looping

The Filter Array action reduces an array to the objects that match your criteria, according to the official documentation on Data Operations. In the Filter Query section you specify which field should be compared to which value, for example Status is equal to Open, and the result is a new array with exactly the matching entries. There are two things you should know about it:

  • The action can reduce the number of objects, but it cannot change the shape of the individual objects. For reshaping you additionally need Select.
  • The comparison text is case-sensitive, so a filter on open will not find an object with the value Open.

For simple comparisons the basic view is enough; for combined conditions with And/Or logic you switch to advanced mode and write the expression directly.

The Select Action: Restructuring Data Without a Loop

While Filter Array changes the number of objects, Select changes their shape. With this action you can rename fields, build new fields from existing ones, or leave out fields you don't need, without changing the number of objects in the array. An example from the Microsoft documentation: objects with the fields first and last become, with Select, an array with FirstName, FamilyName, and an additional FullName field that combines both values. The result is again an array that you can pass directly to subsequent actions, for example to a Create CSV table or a SharePoint action. According to Microsoft, this not only reduces the complexity of your flow but also the payload size when the data is subsequently handed off to another system.

Practical Example: Combining Filter Array and Select

In practice the two actions almost always appear one after the other. A typical process that you can implement without a single Apply to Each action:

1. An action such as Get Items or an HTTP call returns an array with all orders.

2. Filter Array reduces the array to the orders with status equal to Open.

3. Select reshapes the remaining objects: only order number, customer name, and amount are kept, with descriptive field names for the target system.

4. The result goes directly to an action that processes multiple records at once, for example Create CSV table or a batch action of the target connector.

Four actions instead of a loop with potentially hundreds of runs, plus a flow that stays understandable at a glance. You retain control over every processing step because each action handles only one clearly defined task.

Where Apply to Each Still Remains the Right Choice

Filter Array and Select do not replace a loop when a separate side effect is needed per element, for example when an email has to be sent for each order individually, a record has to be created in a system without a batch endpoint, or a subflow has to be called. Even when processing one element depends on the result of the previous one, a loop often remains the simpler solution. If you work directly with Dataverse, there's even a third option: instead of using Filter Array and Select in the flow, Microsoft recommends filtering and selecting the data right at the source using the Select Columns and Filter Rows options of the respective action, which reduces the amount of data transferred from the outset. Exactly where the line lies for your setup is best assessed based on the specific flow, for example as part of a Power Automate consulting.

Frequently Asked Questions

Can I Use Filter Array and Select in Any Order?

Generally you filter first with Filter Array and then reshape the result with Select, because Select then has fewer objects to process. Technically the order can also be reversed, but filtering first is usually clearer and somewhat more economical.

Do Filter Array and Select Also Count Against Power Automate's Action Limit?

Yes, each of the two actions counts once against your flow's limit, just like any other action. The difference to Apply to Each is that they always run as a single action regardless of array size, while a loop generates its own action executions per element.

Can Filter Array Also Change the Shape of the Objects in an Array?

No. Filter Array only changes how many objects are contained in the result array, not their structure. If fields need to be renamed, added, or removed, the Select action is responsible for that.

What Happens if Filter Array Doesn't Find a Matching Element?

In that case the action returns an empty array, and the flow continues without an error. If you want to check whether any results exist at all, you combine the result with the length() function in a subsequent condition.

Is Switching from Apply to Each to Filter Array and Select Worthwhile Even for Small Arrays?

For very small, stable arrays with few entries, the performance gain is minor. In that case the advantage lies more in the clarity and maintainability of the flow than in runtime, which pays off at the latest once the array grows larger in production than originally planned.

About NordFlux

NordFlux UG (haftungsbeschränkt)

NordFlux builds digital employees for organisations: automations and AI agents that take over repetitive work. You stay in control.

More about us
Free initial analysis

Concrete questions about automation or AI?

In a free initial analysis we discuss your case directly. No strings attached.

Filter Array and Select Instead of Apply to Each