Aggregate Formulas are formulas that you define in Zoho Analytics which uses at least one aggregate function (SUM, AVG..) in the calculation. The output of such calculations is always a numeric value (metric). Aggregate formulas are mainly used in creating powerful reports. These formulas can be used in Charts, Pivot Tables and Summary View report types in Zoho Analytics.
Zoho Analytics offers a range of in-built aggregate functions which can be used as part of the Aggregate Formulas. You can construct the formulas using these in-built aggregate functions combining it with the basic arithmetic operators like +, -, / and *.
To create an aggregate formula:
Note: You can also insert columns from related tables joined through Lookup Column. The drop-down lists all the parent table associated with the base table. Select the required table, the columns in this table will be listed below. You can insert this in the formula by clicking.
The result of Aggregate Formulas will not be added as a column in the base table. It will be listed in the column panel while creating reports . You can access (view) or edit it by clicking Add > Edit Formulas in the toolbar. Viewing & Editing Formulas is discussed in the next section.
While you create an aggregate formula you can use a wide range of powerful Aggregate functions that are supported by Zoho Analytics. You can use the Formula Column in-built functions , when you create an Aggregate formula, provided it meets the required conditions for an Aggregate formula.
Zoho Analytics enables you to build aggregate formulas using existing aggregate formulas. Reusing existing formulas to create new aggregate formula helps you create powerful formula combinations, as well as eases maintenance of these formula structures in your Workspace.
When you create a new aggregate formula, existing formulas will be listed in the Click to Insert Columns box along with other columns. All the aggregate formulas will be indicated in brown with the ∑ symbol. You can insert these formulas into your new formula definition by clicking them, as you do for the other columns in the table.For example, Let's assume that you have already calculated profit percentage and total cost and you want to calculate total profit gained. Then you can use the existing aggregate formulas to calculate total profit gained. The formula could be something like ("Total Cost" * "Profit") / 100.
Aggregate formulas can be used while creating all reports (charts, pivot tables, and summary views) as you would use a column in a table. When you create a new report over the table, in which you have added the aggregate formula, all the formulas will be listed in the Columns list pane on the left, which can be drag & dropped to create the report.
The following screenshot shows the % Profit aggregate formula, that we added, listed in the columns list page. All the aggregate formulas will be indicated with an icon which contains the symbol.
From the Explorer tab of the Workspace, select the table to which you want to add the aggregate formula.
Aggregate formulas can be used in the report as you use any other data columns in the table. The value of the aggregate formula will be computed for each data point that is displayed in the report in which it is used (i.e., the result is not just a single value). In the chart shown in the screenshot below, the percentage of profit (%Profit) is plotted against the Year. As you see, the value of the Profit percentage is calculated for each year and plotted in the graph.
When you use an Aggregate formula in a report, you will not be able to apply other functions on the formula (as you do for other columns). The function will always be selected as 'Actual' and cannot be modified.
With respect to sharing and collaboration , Aggregate Formulas behave similarly to how a column in a table behaves. When you share a table, all the aggregate formulas that are created over the table will be also shared to the user to whom you are sharing the table. Hence the shared user will be able to use these formulas while creating any report over the data table.
Zoho Analytics allows you to view, edit, format and delete all the formulas defined for a table through the Edit Formula option. You can view & edit both Formula Columns and Aggregate Formulas using this option. To view/edit existing Formula Column or Aggregate Formulas: