Introduction
This blog explains how to use the Filter Array action to filter the array in Power Automate (MS Flow)
Use Case: In my example, I am retrieving opportunities than filtering based on won and lost opportunities.
Steps to be followed:
- Add “+New step”

- Search for filter array action and select that.


- In Filter array action, pass your array in “From”

- Add column by which you want to filter.
In my case, I am filtering based on status of the opportunity that’s why I selected status column.

- Add a condition to filter based on won opportunity.
- NOTE: won opportunity has a status value equal to 1.

- Repeat step number 3 to add filter for lost opportunities.
- NOTE: lost opportunity has a status value equal to 2.

- You can use the “Create HTML table” action to format the result of the filter action.
- Select Create HTML table action

- Enter the Body of the Filter array (won opportunities) from Dynamic content.

- Add columns in the table.
- For Value enter as per below.
item()?['name']


Similarly create table for lost opportunities.

Final Flow:


Result:
