Data Calculation Options
For each axis in the chart, you can specify how the value of the variable will be calculated.
The value can be defined in the following ways:
For numeric variables (Money, Number, Quantity data types): sum, per unit, percent, contribution, formula;
For Bar&Line, Time Series and Detailed Time Series charts there are also index, per unit index, cumulative sum and cumulative contribution.For string variables (Text data type): count, count distinct.
In the following example, we have three possible values of the Customer Type variable (Restaurant, Industry, Consumer) and there are nine records in the Invoice Price field, three for each of the Customer Type variable values:
Customer Type | Restaurant | Industry | Consumer |
|---|---|---|---|
| 150 | 250 | 20 |
50 | 150 | 50 | |
100 | 200 | 30 |
Using this sample data, we will demonstrate what the available calculation options actually calculate.
Sum
Sum () calculates the sum of the selected data field (Datamart column).
The sum function returns a simple total of all records of the field:
| Restaurant | Industry | Consumer |
|---|---|---|---|
Σ Invoice Price | 300 | 600 | 100 |
Per Unit
Per unit () divides the sum of the selected data field by the sum of the Quantity field. The Quantity field is defined in the Datamart (Analytics > Datamarts; the data type of the field must be Quantity, the Function must be set to Per Unit Basis).
The per unit function takes the sum of the invoice price for each customer type and divides it by the amount of units purchased. The result is the price per unit:
| Restaurant | Industry | Consumer |
|---|---|---|---|
Σ Invoice Price | 300 | 600 | 100 |
Quantity | 20 | 50 | 10 |
Per Unit | 15 | 12 | 10 |
Percent
Percent (%) calculates the percentage value of the selected data field in relation to the Percent Basis field. The Percent Basis field is set in the Datamart (Analytics > Datamarts; set the Function to Percent Basis).
The percent function takes the sum of the invoice price and returns its ratio to the sum of the list price (which is the percent basis field) as a percentage:
| Restaurant | Industry | Consumer |
|---|---|---|---|
Σ Invoice Price | 300 | 600 | 100 |
Σ List Price | 360 | 700 | 110 |
Percent | 83.3% | 85.7% | 90.9% |
Contribution
Contribution () calculates the percentage value of the sum of the selected data field and displays it as a decimal.
This option is not supported by Rollups.
The contribution function takes the sum of the invoice price for each customer type and calculates its proportionate part of the Invoice Price total:
| Restaurant | Industry | Consumer |
|---|---|---|---|
Σ Invoice Price | 300 + 600 + 100 = 1000 | ||
Contribution | 0.3 | 0.6 | 0.1 |
Index
Index () takes the first record as a benchmark and displays all other values as a ratio to this benchmark. It enables you, for example, to see the variation in value over time.
This option is not supported by Rollups.
Record # | Net Margin | Index |
|---|---|---|
1 | 6.29 | 1 |
2 | 8.60 | 1.37 |
3 | 9.00 | 1.43 |
4 | 5.88 | 0.93 |