Nowadays, I am working with an array in Power Automate. So, doing a bit more research on this. In today’s tutorial, I will explain how to filter an array by multiple conditions in Power Automate. We will use the same filter array action in Power Automate.
Here, I will also show you two different examples:
- Filter an Array by multiple conditions in a manually created array using Power Automate
- Filter Excel items array by multiple conditions in Power Automate
Filter an Array by Multiple Conditions in Power Automate
For this example, we will manually create an array of objects and explore how to filter it with multiple conditions in Power Automate.
You can see below the Array of objects for ‘Employee Records’:
[
{
"Name": "Alice",
"Department": "HR",
"Status": "Active",
"Email": "[email protected]",
"Location": "New York"
},
{
"Name": "Miriam",
"Department": "Finance",
"Status": "Inactive",
"Email": "[email protected]",
"Location": "Chicago"
},
{
"Name": "Charlie",
"Department": "IT",
"Status": "Active",
"Email": "[email protected]",
"Location": "San Francisco"
},
{
"Name": "Johanna",
"Department": "IT",
"Status": "Inactive",
"Email": "[email protected]",
"Location": "Boston"
},
{
"Name": "Alex",
"Department": "HR",
"Status": "Active",
"Email": "[email protected]",
"Location": "Seattle"
},
{
"Name": "Frank",
"Department": "Marketing",
"Status": "Active",
"Email": "[email protected]",
"Location": "Miami"
}
]Now, I want to filter the array mentioned above, based on multiple conditions that include:
- Department = HR (or) IT
- Status = Active
- Location = New York
- These three conditions should be satisfied by the and() function.
To filter this, we can use the Filter Array action in Power Automate. Follow the steps below.
- For this, I will create an Instant cloud flow in Power Automate. You can check out Instant Cloud Flow if you don’t know how to build flows in Power Automate.
- To set the Array values to a variable, add an ‘Initialize variable’ action. Enter the name for a variable, set Type as (Array), and Value with the array of objects placed in the above code.

- Then, take a ‘Filter array’ action to filter the array values based on the given multiple conditions. Set parameters such as ‘From’ and ‘Filter Query’.
- From: Choose a variable from the previous step. In my case, it is VarEmployeeRecords.
- Filter Query: Click on Edit in Advanced mode option -> Insert the expression provided in the code below.
and(
or(
equals(item()?['Department'],'HR'),
equals(item()?['Department'],'IT')
),
equals(item()?['Status'],'Active'),
equals(item()?['Location'],'New York')
)
- Following the previous step, I will add a ‘Compose’ action to display the filtered items. Include the body of the filter array action within the Inputs parameter.

The flow is completed now. Click on the Save button to save the flow. Then, run it manually.
Output:

Filter Excel Items Array by Multiple Conditions in Power Automate
Let me explain this example by referencing the Excel items array using the Power Automate Filter array action.
You can see the Excel sheet with the list of records in the screenshot below:

From the list of items present in the Excel sheet, I wanted to filter the records that satisfy the following multiple conditions.
- Designation contains Manager substring [OR] Experience >5 Years
- Joining Date = Today’s Date
- Location = Chicago
- The four statements should be satisfied by the and() function.
- On the Power Automate canvas, add a ‘Manually trigger a flow’ trigger, which can be run by clicking a button.
- Then, to fetch the rows present in an Excel table, add the ‘List rows present in a table’ action. Set the required parameters.
- Location: Select the SharePoint site address or OneDrive location where you stored the file.
- Document Library: Choose the specific document library from the options.
- File: Select the desired file.
- Table: Choose the table from the drop-down options.

Note:
The Excel stores dates in the integer format. While filtering the excel items based on the date column, first we need to convert the integer format into date format that Power Automate should recognise.
Expression to convert integer into date format:
addDays(’12/30/1899′, int(item()?[‘Joining Date’]), ‘yyyy-MM-dd’) – Replace Joining Date with your Excel column name.
- Next to that, take the ‘Filter Array’ action that filters the Excel items based on multiple conditions. Provide the following parameters.
- From: Take body/value dynamic content from the filter array action.
- Filter Query: Click on the Edit in advanced mode button -> Insert the expression placed below.
and(
or(
contains(item()?['Designation'], 'Manager'),
greater(int(item()?['Experience']), 5)
),
equals(
addDays('12/30/1899', int(item()?['JoiningDate']), 'yyyy-MM-dd'),
formatDateTime(utcNow(), 'yyyy-MM-dd')
),
equals(item()?['Location'], 'Chicago')
)

- In the final step, add a ‘Compose’ action to display the outputs from the previous step.
- Inputs: Select Body(Filter Array) from dynamic content.

Save and run the flow.
Output:
- Have a look at the reference image, which shows the record that satisfies all the given conditions.

You can also check the above details in the Excel sheet.

In this tutorial, you have learnt how to filter an array based on multiple conditions in Power Automate through two different examples.
I hope you found this article helpful and informative. Feel free to share your thoughts and feedback in the comments section below.
Power Automate Articles You May Read:
- How to Filter an Array by Index in Power Automate?
- Power Automate Array Variable
- Reverse Array in Power Automate
- Power Automate Remove Item from Array

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.