- HOME
- Tips and Tricks
- How to use the group by and aggregate functionalities to generate customized documents
How to use the group by and aggregate functionalities to generate customized documents
- Last Updated : March 21, 2025
- 22 Views
- 2 Min Read
Hello everyone,
This article explains the steps to use the group by and aggregate functions of Writer's merge templates to summarize and present data while creating business documents like sales, marketing, finance, or expense reports.
Let's explain this with an example. Say, you wish to generate a detailed report on your organization's marketing expenditures during the last year to analyze the spending. You can now use the group by and aggregate functions in Writer's merge templates to:
- Classify and group together related expenses, based on region, product, or campaign
- Get the total for each category and also the overall expense using the sum function
Here's a step-by-step guide:
Step 1: Create a blank merge template and add the report content. You can add placeholder fields for data such as the report period and region, then use the formatting and editing options to create a customized template for the report.
Step 2: Connect to the data source, apply the group by function to the required fields, and map the fields in the template to the corresponding fields of the data source.
Step 3: Insert a table at the appropriate sections, such as the category, region, campaign, and product, to list all the corresponding expense items.
Step 4: Insert the fields in the appropriate table columns. You can also segregate the grouped data further as required. For example, you can group the expense data based on region, then by product, and then by period.
Step 5: Apply the SUM function at the required table cells or columns to calculate the total for that specific grouped data. Detailed steps on how to add an aggregate field.
Step 6: Click Preview Merge to check if the data is being grouped and aggregated as required.
Step 7: Choose Merge & Send via email as the output option to automatically share the generated report with various stakeholders. Detailed steps on merging for emails.
Step 8: Click Run Merge to generate and share the report with the expense data grouped and aggregated as specified. You can also schedule the merge to generate and share the report at your desired time.
This is just one example of how you can leverage the group by and aggregate functions in Zoho Writer.
You can apply these features to any document, such as sales performance, analysis, payroll summaries, and more, where you wish to present data in a clear and easily understandable more.
Learn more: User guide for Writer’s advanced merge templates.
Try the group by and aggregate functions and share your feedback with us at support@zohowriter.com or support@eu.zohowriter.com or in the comments below.
If you have any features you’d like us to add to Zoho Writer, let us know in the comments!