logo
search
Template Issues

How to Use the FILTER Function in a Word Template with Power Automate

Emma BrownEmma Brown Oct 8, 2026 869 views

Question details

The user wants to filter numerical data, specifically ratings below 2.0, to calculate an average within a Word template populated via Power Automate.

How to Filter Data in a Word Template Using Power Automate
Product
Microsoft Word / Power Automate
Device & OS
not provided
Scenario
Filtering specific values from a dataset and calculating their average before inserting the final result into an automated Word document template.
Observed behavior
The user is unable to use Excel-style FILTER formulas directly inside the Word template to process data.
Before you start

Ensure you have editing access to your Power Automate flow and the original data source (such as Excel or Dataverse) where the ratings are stored.

Solution 1Recommended

Filter Data Within the Power Automate Flow

Since Word templates do not support dynamic Excel-style formulas, the most robust solution is to perform the filtering and calculations directly inside your flow before populating the template.

Microsoft Word handles text and basic layout, but it lacks the computational engine of Excel. To achieve your goal, you must extract the data, filter it using Power Automate actions, calculate the average, and then pass only the final static number to the Word template.

1
Locate data retrieval step

Open your workflow in Power Automate and find the step where you fetch your array of ratings from your data source.

2
Add a Filter Array action

Insert a 'Filter array' action immediately after data retrieval. Set the condition to filter your target values, such as setting 'Rating' to 'is less than' and entering '2.0'.

3
Calculate the average

Use compose actions or variables to calculate the average of the filtered array elements within the flow.

4
Map to Word template

Add the 'Populate a Microsoft Word template' action. Map the final averaged variable to the corresponding plain text content control field in your Word document.

Filter Data Within the Power Automate Flow
Community Support: For complex JSON parsing or array calculations within flows, posting your workflow structure to the Microsoft Power Automate Community often yields precise formula strings.
Free Microsoft Office alternative

Need a Lightweight, Highly Compatible Office Suite? Try WPS Office

While complex automations like Power Automate require specific Microsoft integrations, handling everyday document templates shouldn't be expensive or slow. WPS Office offers a free, lightweight alternative that is fully compatible with major office formats.

  1. 1. Download and Install: Visit the official WPS website to download and install the free WPS Office suite on your device.
  2. 2. Open your Templates: Launch WPS Writer, click 'Open', and select your existing .docx or .dotx Word templates to start editing immediately.
  3. 3. Edit without Compatibility Issues: Modify styles, text, and layouts effortlessly while preserving the original document formatting.
Fully compatible with Microsoft Word formats (.docx, .dotx) and standard template designs.Familiar user interface ensuring zero learning curve for users migrating from other office suites.Lightweight installation that runs fast even on older hardware or budget laptops.Built-in PDF editing, document merging, and highly capable spreadsheet tools in one free suite.
QA img-9

Frequently Asked Questions

Can I use Excel formulas like FILTER directly in a Word template?

No, Microsoft Word templates do not support Excel-style dynamic array formulas or complex calculations. Any filtering or math must be completed in your data source or within your automation flow before the document is generated.

How do I map data to a Word template in Power Automate?

You must first enable the Developer tab in Word and insert 'Plain Text Content Controls' where you want data to appear. Once saved, the 'Populate a Microsoft Word template' action in Power Automate will detect these controls and allow you to map dynamic flow variables to them.

Where can I get help with advanced Power Automate data arrays?

If you are struggling to filter arrays or calculate averages inside a workflow, the Microsoft Power Automate Community forum is the best resource. Experienced users and Microsoft MVPs frequently provide exact expressions for data operations.