prod function
The prod function returns the product of the column, evaluated within groups defined by the group parameter if required.
Parameters
prod(column, group)
Parameter | Description |
---|---|
column | The attribute used to evaluate the product. Multiple attributes can be specified, as long as they are enclosed in double brackets, i.e. column((column1, column2)). The column parameter is mandatory. |
group | The attribute by which you want to group your results. Multiple attributes can be specified, as long as they are enclosed in double brackets, i.e. prod(column,(group1,group2)). |
Example
The following example uses the Prod dataset.
This example isn’t based on a real scenario, it only explains how to use the function.
Description | Screenshot |
---|---|
In this example, we want to evaluate the product of all the values within the Var_2 attribute, grouped by the Var_1 attribute’s values. Add a new attribute, then type the following formula:
The results can be read as follows:
|