Power Automate Filter Array + Examples

In this Power Automate tutorial, we will discuss the power Automate filter array action with a few examples. And also we will discuss the below points:

  • Power automate filter array
  • Power automate filter array contains
  • Power automate filter array and
  • Power automate filter array and or
  • Power automate filter array by date
  • Power automate filter array remove empty
  • Power automate filter array multiple conditions
  • Power automate filter array of objects
  • Power automate filter array SharePoint list
  • Power automate filter array parse Json
  • Power automate filter array excel table
  • Power automate filter array choice column
  • Power automate filter array calculated column
  • Power automate filter array @equal
  • Power automate filter array not equal
  • Power automate filter array less than
  • Power automate filter array lookup column
  • Power automate get length of filter array
  • Power automate filter array starts with

Power Automate filter array

The Power Filter array action, filter or reduce the object from an array if the criteria or condition you provide in the subset match.

Power Automate filter array contains

Here we will see how to use contain in Power Automate Filter action.

Here we will use the below array, from this array we will filter the object whose department contains IT.

[
  {
    "Name": "Alex",
    "Age": 38,
"Department":"Finance"
  },
  {
    "Name": "Michel",
    "Age": 38,
"Department":"Finance"
  },
  {
    "Name": "Celia",
    "Age": 30,
"Department":"IT"
  },
  {
    "Name": "Ruby",
    "Age": 32,
"Department":"Finance"
  },
 {
    "Name": "John",
    "Age": 32,
"Department":"HR"
  },
 {
    "Name": "Maven",
    "Age": 28,
"Department":"HR"
  }

]

In Power Automate, select the Manually triggered Flow, then click on the Next step.

Power Automate Filter array
Power Automate Filter array

Select Initialize variable action, then provide the variable name, type as an array, and in value add the above array.

power automate filter array contains
power automate filter array contains

Now we will filter the array to get the object whose department is IT, so click on the next step and select Filter array action than in the From provide the above array. Next click on Edit in Advanced Mode, then write the below condition.

@contains(item()?['Department'], 'IT')
How power automate filter array contains
How power automate filter array contains

Now click on Save and run the flow manually, and you can see the object contains IT.

Microsoft Flow filter array contains
Microsoft Flow filter array contains

This is an example of the Power Automate filter array contains.

Read Power Automate update SharePoint list item

Power Automate filter array and

Here we will see how to use and in Power Automate Filter Array action.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate filter array and
power automate filter array and

Next, we will initialize variable action, then provide the variable name, type as Array, and in value write the below array.

[
  {
    "Name": "Alex",
    "Age": "38",
"Department":"Finance"
  },
  {
    "Name": "Michel",
    "Age": "38",
"Department":"Finance"
  },
  {
    "Name": "Celia",
    "Age": "30",
"Department":"IT"
  },
  {
    "Name": "Ruby",
    "Age": "32",
"Department":"Finance"
  },
 {
    "Name": "John",
    "Age": "32",
"Department":"HR"
  },
 {
    "Name": "Maven",
    "Age": "28",
"Department":"HR"
  }
]
Microsoft Flow filter array and
Microsoft Flow filter array and

Now we will filter the above array to get the person whose department is Finance and age is 38. So click on the Next step and select Filter array action. Then provide the above array and click on Edit in advanced mode and write the below condition:

@and(equals(item().Department, 'Finance'),equals(item().Age, '38'))
How power automate filter array and
How power automate filter array and

Now click on Save and run the flow manually and you can see the result of the person having finance department and age is 38.

MS Flow filter array and
MS Flow filter array and

This is an example of the Power Automate filter array and.

Read Power Automate update SharePoint list increment integer field

Power Automate filter array and or

Here we will see And and Or operation in the Power Automate filter array.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate filter array and or
power automate filter array and or

Now initialize variable action, then provide the variable name, type as an array, and in value add the below sample array.

[
  {
    "Name": "Alex",
    "Age": "38",
"Department":"Finance"
  },
  {
    "Name": "Michel",
    "Age": "38",
"Department":"Finance"
  },
  {
    "Name": "Celia",
    "Age": "30",
"Department":"IT"
  },
  {
    "Name": "Ruby",
    "Age": "32",
"Department":"Finance"
  },
 {
    "Name": "John",
    "Age": "32",
"Department":"HR"
  },
 {
    "Name": "Maven",
    "Age": "28",
"Department":"HR"
  }
]
How Microsoft Flow filter array and or
How Microsoft Flow filter array and or

Now we will filter the above array to get the person whose department is Finance and age is 38 or person from any department of age 30. So click on the Next step and select Filter array action. Then provide the above array and click on Edit in Advanced mode and write the below condition:

@or(and(equals(item().Department, 'Finance'),equals(item().Age, '38')),equals(item().Age, '30'))
MS Flow filter array and or
MS Flow filter array and or

Now click on Save and run the Flow manually, you can see the result in the output of the filter array.

How MS Flow filter array and or
How MS Flow filter array and or

This is an example of a Power Automate filter array and or.

Read Convert SharePoint list item to PDF using Flow or Power Automate

Power Automate filter array by date

Here we will see how to filter array by date using the Power Automate Filter array action.

In this example, we will use the SharePoint list called the Project management list. From this list, we will filter the items whose end date is equal to the current date.

power automate filter array by date
power automate filter array by date

In Power Automate, select the Manually triggered Flow, then click on the next step.

How power automate filter array by date
How power automate filter array by date

Now we will Get items from the SharePoint list, so click on the Next step and select Get items action. then provide the site address and list name.

Microsoft Flow filter array by date
Microsoft Flow filter array by date

Now we will filter the array of items whose end date is greater than or equal to the current date. So click on the Next step and select Filter array action. Then provide the value in the From and provide the

  • value: End date from dynamic content
  • operator: is greater than or equal to
  • value: write the below expression
formatDateTime(utcNow(), 'yyyy-MM-dd')
How Microsoft Flow filter array by date
How Microsoft Flow filter array by date

Now we will create an HTML table by using a filter array. So click on the Next step and select Create Html table action. Then provide the body of the Filter array and click on Shaw advanced options, select the column as custom the map the column with value. To assign a value, you can use this expression format.

item()?['Column Name']
MS Flow filter array by date
MS Flow filter array by date

Now click on Save and run the Flow manually and you can see the result create Html table output.

How MS Flow filter array by date
How MS Flow filter array by date

This is an example of a Power Automate filter array by date.

Read Power Automate delete all items in SharePoint list

Power Automate filter array remove empty

Here we will see how to remove empty from an array using the Power Automate Filter Array action.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate filter array remove empty
power automate filter array remove empty

Select Initialize variable action, then provide the variable name, type as Array, and in value assign the below array.

["1","2","3",""]
How Power Automate filter array remove empty
How Power Automate filter array remove empty

Now we will filter the empty from an array, so click on the Next step and select Filter Array action. Then provide the varArray in the From and click on Edit in Advanced Mode, then provide the below condition:

@equals(empty(item()),false)
Microsoft Flow filter array remove empty
Microsoft Flow filter array remove empty

Now click on Save and run the flow, you can see the empty is removed from the array.

How Microsoft Flow filter array remove empty
How Microsoft Flow filter array remove empty

This is an example of a Power Automate filter array removed empty.

Read Power Automate export SharePoint list to excel and send an email

Power Automate filter array multiple conditions

Here we will see how to use Multiple conditions in power Automate Filter array action.

In Power Automate, select the Manually triggered Flow, then click on the next step.

power automate filter array multiple conditions
power automate filter array multiple conditions

Select initialize variable action, then provide the variable name, type as an array and in value add the below sample array.

[
  {
    "Name": "Alex",
    "Age": "38",
"Department":"Finance"
  },
  {
    "Name": "Michel",
    "Age": "38",
"Department":"Finance"
  },
  {
    "Name": "Celia",
    "Age": "30",
"Department":"IT"
  },
  {
    "Name": "Ruby",
    "Age": "32",
"Department":"Finance"
  },
 {
    "Name": "John",
    "Age": "32",
"Department":"HR"
  },
 {
    "Name": "Maven",
    "Age": "28",
"Department":"HR"
  }
]
How power automate filter array multiple conditions
How power automate filter array multiple conditions

Now we will filter to get the name whose department is Finance and age is 38. So click on the Next step and select Filter array action. Then provide the varArray from the dynamic content, and click on Edit in Advanced Mode. Then Provide the below condition:

@and(equals(item()?['Department'],'Finance'),equals(item()?['Age'],'38'))
Microsoft Flow filter array multiple conditions
Microsoft Flow filter array multiple conditions

Now click on Save and run the Flow manually you can see the result in the output of the filter array.

How Microsoft Flow filter array multiple conditions
How Microsoft Flow filter array multiple conditions

This is an example of a Power Automate filter array with multiple conditions.

Read Power Automate delete file from SharePoint

Power Automate filter array of objects

Here we will see how to filter an array of objects using the Power Automate Filter Array action.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate filter array of objects
power automate filter array of objects

Select initialize variable action then provide the variable name, type as array and in value add the above sample array.

How power automate filter array of objects
How power automate filter array of objects

Next, we will filter the above array of people whose age is 38, so click on the next step and select Filter array action. Then provide the above array and click on Edit in advanced mode, provide the below condition:

@equals(item()?['Age'], '38')
Microsoft Flow filter array of objects
Microsoft Flow filter array of objects

Now click on Save and run the flow manually, you can see the result of person whose age is 38.

How Microsoft Flow filter array of objects
How Microsoft Flow filter array of objects

This is an example of a Power Automate filter array of objects.

Read How do I restore removed files in SharePoint with Power Automate

Power Automate filter array SharePoint list

Here we will see how to filter the array of items in the SharePoint list using Power Automate

We will use the SharePoint list called Project management list, and we will filter the array of items based on Status is completed.

power automate filter array SharePoint list
power automate filter array SharePoint list

In Power Automate, select the Manually triggered Flow, then click on the Next step.

How power automate filter array SharePoint list
How power automate filter array SharePoint list

Next, we will get items from the list, so click on the Next step and select Get items action. Then provide the site address and List name.

MS Flow filter array SharePoint list
MS Flow filter array SharePoint list

Next, we will filter the items, status is completed, so click on the Next step and select Filter array action. Then provide the value from get items action, and provide

  • value- Status value from dynamic content
  • Operator- is equal to
  • Value-Completed.
How MS Flow filter array SharePoint list
How MS Flow filter array SharePoint list

Next, we will create an Html table using Filter items, so click on the Next step and select Create Html table action. Then provide the body of the Filter array, click on Show advanced options, then change the column advanced to custom. Next map the header with values like below:

HeaderValue
Nameitem()?[‘Title’]
Start Dateitem()?[‘StartDate’]
End Dateitem()?[‘EndDate’]
Statusitem()?[‘Status’]?[‘Value’]
Assigned toitem()?[‘Assignedto’]?[‘Displayname’]
How Microsoft Flow filter array SharePoint list
How Microsoft Flow filter array SharePoint list

Now click on Save and run the Flow manually and you can see the result, the project status is completed.

Microsoft Flow filter array SharePoint list
Microsoft Flow filter array SharePoint list

This is an example of a Power Automate filter array SharePoint list.

Read Power Automate create table with examples

Power Automate filter array parse Json

Here we will see an example of Power Automate filter array parse JSON.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate filter array parse Json
power automate filter array parse Json

Now we will initialize the array variable and provide the above sample array, so select the initialize variable action and then provide the name, type as an array and in value use the above sample array.

How power automate filter array parse Json
How power automate filter array parse Json

Now click on the Next step and select Parse JSON action, then provide the varArray as content and generate the sample schema by providing the data.

Microsoft Flow filter array parse Json
Microsoft Flow filter array parse Json

Next, we filter the array to get department is IT, so click on the Next step and select Filter array action. Then From provide the body of parse JSON. Then in value choose Department from dynamic content, the operator is equal to and in value IT.

MS Flow filter array parse Json
MS Flow filter array parse Json

Now click on Save and run the Flow manually and you can see the result in the Filter array.

 filter array parse Json in Power Automate
filter array parse Json in Power Automate

This is an example of a Power Automate filter array parse JSON.

Read How to get days of month in Power Automate

Power Automate filter array excel table

Here we will see how to filter excel table data using Power Automate.

So for this example, we will use the below excel table.

How power automate filter array excel table
How power automate filter array excel table

In Power Automate, select manually triggered Flow, then click on the Next step.

power automate filter array excel table
power automate filter array excel table

We will retrieve the rows from the excel table so select List rows present in a table action. Then provide the Location, Excel Demo, File, and Table.

Microsoft Flow filter array excel table
Microsoft Flow filter array excel table

Now filter the array to get the person department is Finance, so click on the next step and select Filter array action, then provide the value from dynamic content, and in value select the department from dynamic content, the operator is equal to, and in value write Finance.

How Microsoft Flow filter array excel table
How Microsoft Flow filter array excel table

Now click on save and run the Flow manually you can see the result in the body of the Filter array.

MS Flow filter array excel table
MS Flow filter array excel table

This is an example of a Power Automate filter array excel table.

Read How to convert word to pdf using Power Automate

Power Automate filter array choice column

Here we will how to filter the array of SharePoint items based on the choice column using Power Automate.

So for this example, we will use the Sharepoint list called SalesOrder list. In this list status column is a choice column.

power automate filter array choice column
power automate filter array choice column

In Power Automate, select the Manually triggered Flow, then click on the Next step.

How power automate filter array choice column
How power automate filter array choice column

Now we will get items from the list, so select Get items action. Then provide the site address and list name.

How power automate filter array choice column
How power automate filter array choice column

Now we will filter the array of items, so click on the Next step and select the Filter array action. Then provide the value in the From field from the dynamic content. And in value add the Status value from dynamic content, an operator is equal to, and in value add Delivered.

Microsoft Flow filter array choice column
Microsoft Flow filter array choice column

Now we will create an Html table, so click on the Next step and select Create Html table action. Then provide body in the From field from the dynamic content. Then click on Show advanced options and select custom columns. Then add the below header and value.

HeaderValue
Productitem()?[‘Title’]
Companyitem()?[‘Company’]
Order Dateitem()?[‘OrderDate’]
Statusitem()?[‘Status’][‘Value’]
How Microsoft Flow filter array choice column
How Microsoft Flow filter array choice column
MS Flow filter array choice column
MS Flow filter array choice column

This is an example of a Power Automate filter array choice column.

Read Power Automate Compose

Power Automate filter array calculated column

Here we will see how to Filter the array using a Calculated column in Power Automate or Microsoft Flow.

For this example we will use the SharePoint list called Sales order list, in this list the revenue column is calculated column.

power automate filter array calculated column
power automate filter array calculated column

In Power Automate, select the Manually triggered Flow, then click on the Next step.

How power automate filter array calculated column
How power automate filter array calculated column

Now we will get items from the SharePoint list, so click on the next step and select Get items action. Then provide the site address, and list name in Sharepoint.

MS Flow filter array calculated column
MS Flow filter array calculated column

Next, we will filter the array of products revenue is less than 500000, so click on the next step and select Filter array action. Then provide the value of the Get item from the dynamic content. Next, click on Edit in Advanced Mode and write the below condition

@less(float(item()?['Revenue']), float('500000'))
How MS Flow filter array calculated column
How MS Flow filter array calculated column

Next, we will create an Html table, so click on the Next step and select Create Html table action. Then provide the body of the Filter array from dynamic content. So click on the Show advanced option, choose the custom column, the map the header and value like below.

HeaderValue
Productitem()?[‘Title’]
Unititem()?[‘Units’]
AveragePriceitem()?[‘Averageprice’]
Revenueitem()?[‘Revenue’]
Microsoft Flow filter array calculated column
Microsoft Flow filter array calculated column

Now click on Save and run the Flow manually and you can see the output, revenue less than 500000.

How Microsoft Flow filter array calculated column
How Microsoft Flow filter array calculated column

This is an example of a Power Automate filter array calculated column.

Read Send an Email when Item added in a SharePoint list using Microsoft Flow

Power Automate filter array @equal

Here we will see how to use an equal operator in the advanced mode of Filter array.

In Power Automate, select the Manually triggered Flow, then click on the next step.

power automate filter array @equal
power automate filter array @equal

Now we will initialize an array variable and assign the above sample array to it, so select initialize variable action, then provide the variable name, type as an array, and in value provide the sample value.

How power automate filter array @equal
How power automate filter array @equal

Next, we will filter the above array to get the details of the person whose name is Alex. So click on the next step and select Filter array action. Then provide the varArray from dynamic content. Then click on Edit in advanced mode, and write the below condition:

@equals(item()?['Name'],'Alex')
Microsoft Flow filter array @equal
Microsoft Flow filter array @equal

Now click on Save and run the Flow manually and you can see the person’s details whose name is Alex.

MS Flow filter array @equal
MS Flow filter array @equal

This is an example of a Power Automate filter array @equal.

Read How to create auto increment column in SharePoint List

Power Automate filter array not equal

Here we will see how to use not equal in filter array using Power Automate.

In Power Automate, select the Manually triggered Flow, click on the Next step.

power automate filter array not equal
power automate filter array not equal

Now we will initialize the array variable with sample value, so select initialize variable action. Then provide the variable name, type as an array, and in value provide the above sample array.

How power automate filter array not equal
How power automate filter array not equal

Next, we will filter the above array based on the condition, Department is not equal to Finance, so click on the Next step and select Filter array action. Then in From field provide varArray from the dynamic content, click on Edit Advance mode and write the below condition.

@not(equals(item()?['Department'], 'Finance'))
Microsoft Flow filter array not equal
Microsoft Flow filter array not equal

Now click on Save and run the Flow manually, and you can see the output in the Filter array action.

MS Flow filter array not equal
MS Flow filter array not equal

This is an example of a Power Automate filter array not equal.

Read Share organization new employee details in Twitter using Microsoft flow

Power Automate filter array less than

Here we will see how to use less than in filter array using Power Automate.

In Power Automate, select the Manually triggered Flow, then click on the next step.

power automate filter array less than
power automate filter array less than

Now initialize array variable with below sample array, so select Initialize variable action, then provide the variable name, type as an array and in value write the below sample array:

[
  {
    "Name": "Alex",
    "Age": 28
  },
  {
    "Name": "Michel",
    "Age": 38
  },
  {
    "Name": "Celia",
    "Age": 30
  },
  {
    "Name": "Ruby",
    "Age": 32
  }
]
How power automate filter array less than
How power automate filter array less than

Now we will filter the above array, persons whose age is less than 32. So click on the Next step and select Filter array action. then provide the varArray from dynamic content. And click on Edit in Advance mode, then write the below condition:

@less(item()?['Age'], 32)
Microsoft Flow filter array less than
Microsoft Flow filter array less than

Now click on Save and run the Flow manually and you can see the person’s name whose age is less than 32.

MS Flow filter array less than
MS Flow filter array less than

This is an example of a Power Automate filter array less than.

Read Create a Leave request approval workflow using Microsoft Flow in SharePoint Online

Power Automate filter array lookup column

Here we will how to filter an array of items based on the SharePoint Lookup column using Power Automate.

So for this example, we will use the below Sharepoint list i.e. Course list, in this list Technology is the Lookup column.

power automate filter array lookup column
power automate filter array lookup column

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate filter array lookup column
power automate filter array lookup column

Now we will get items from the SharePoint list, so click on the Next step and select Get items action. Then provide the site address and List name of the SharePoint list.

How power automate filter array lookup column
How power automate filter array lookup column

Now we will Filter an array of items to get the course which technology is Sharepoint. So click on the next step and select Filter array action, then provide the value of Get items from dynamic content. Then in value select technology value, the operator is equal to, and value in SharePoint.

Microsoft Flow filter array lookup column
Microsoft Flow filter array lookup column

Now we will create an Html table, so click on the Next step and select Create Html table action. Then provide the body of the Filter array, click on Edit in Advanced mode, and select column to custom. Then map the header with value.

HeaderValue
Courseitem()?[‘Title’]
Instructoritem()?[‘Instructor’][‘DisplayName’]
Technologyitem()?[‘Technology’][‘Value’]
MS Flow filter array lookup column
MS Flow filter array lookup column

Now click on Save and run the Flow Manually and you can see the result in the output of Create Html table.

With MS Flow filter array lookup column
With MS Flow filter array lookup column

This is an example of a Power Automate filter array lookup column.

Read Send text to all emergency contacts from a SharePoint list using Microsoft Flow

Power Automate get length of filter array

Here we will see how to count or get the length of the Filter array using Power Automate.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate get length of filter array
power automate get the length of the filter array

Now initialize array variable and assign a sample array, so select initialize variable action, then provide the variable name, type as an array, and in value provide the below sample array.

[
  {
    "Name": "Alex",
    "Age": 28
  },
  {
    "Name": "Michel",
    "Age": 38
  },
  {
    "Name": "Celia",
    "Age": 30
  },
  {
    "Name": "Ruby",
    "Age": 32
  }
]
How power automate get length of filter array
How power automate get length of filter array

Now we will filter the array to get the person whose age is greater than 30, so click on the Next step and select Filter array action. Then provide the varArray from dynamic content. Next click on Edit in Advanced mode write the below condition:

@greater(item()?['Age'], 30)
Microsoft Flow get length of filter array
Microsoft Flow get length of filter array

Now to calculate the length of the Filter array, click on the Next step and select Compose action. Then in input write the below expression:

length(body('Filter_array'))
MS Flow get length of filter array
MS Flow get length of filter array

Now click on Save and run the flow manually, there are two-person whose age is greater than 30, so the length is 2.

How MS Flow get length of filter array
How MS Flow get length of filter array

This is an example of a how to get length of filter array in Power Automate.

Read Send a Happy Birthday email to employees using Microsoft Flow in SharePoint Online

Power Automate filter array starts with

Here we will see how to use start with operator in Filter array action using Power Automate

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate filter array starts with
power automate filter array starts with

Now we will Initialize variable action, then provide the variable name, type as an array, and in value provide the above sample array.

How power automate filter array starts with
How power automate filter array starts with

Now we will filter the above array whose name starts with C, so click on the Next step and select Filter Array action, then provide the above array from dynamic content. And the provide

  • value: item()?[‘Name’]
  • operator: Start with
  • value: C
Microsoft Flow filter array starts with
Microsoft Flow filter array starts with

Now click on Save and run the flow Manually and you can see the name start with C.

MS Flow filter array starts with
MS Flow filter array starts with

This is an example of a Power Automate filter array starts with.

Related Power Automate tutorials:

In this Power Automate tutorial, we learned Power Automate filter array action. And also we discuss the below example:

  • Power automate filter array
  • Power automate filter array contains
  • Power automate filter array and
  • Power automate filter array and or
  • Power automate filter array by date
  • Power automate filter array remove empty
  • Power automate filter array multiple conditions
  • Power automate filter array of objects
  • Power automate filter array SharePoint list
  • Power automate filter array parse Json
  • Power automate filter array excel table
  • Power automate filter array choice column
  • Power automate filter array calculated column
  • Power automate filter array @equal
  • Power automate filter array not equal
  • Power automate filter array less than
  • Power automate filter array lookup column
  • Power automate get length of filter array
  • Power automate filter array starts with
>