How to Use the FILTER Function in a Word Template with Power Automate
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.

- 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.
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.
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.
Open your workflow in Power Automate and find the step where you fetch your array of ratings from your data source.
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'.
Use compose actions or variables to calculate the average of the filtered array elements within the flow.
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.

Calculate the Filtered Average in the Source Excel File
If your data source is an Excel workbook, you can bypass complex Power Automate logic by letting Excel do the math for you.
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. Download and Install: Visit the official WPS website to download and install the free WPS Office suite on your device.
- 2. Open your Templates: Launch WPS Writer, click 'Open', and select your existing .docx or .dotx Word templates to start editing immediately.
- 3. Edit without Compatibility Issues: Modify styles, text, and layouts effortlessly while preserving the original document formatting.

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.




