### Symptom

How can values in a composite table be aggregated in a sum or referenced elsewhere?

### Environment

SAP SuccessFactors Workforce Analytics

### Resolution

Create a query cell in the composite table containing all possible parts of the amount you want to add up. If they must come from different cells, put all cells to be counted on one same column or row.

In the same column or row, create a Formula cell. In the Expression field, use the SUM function on the cell with the values, e.g. SUM(R1C1). If several cells need to be added, simply use +, e.g. SUM(R1C1) + SUM(R1C2).

The format field comes with a standard string and may need to be adjusted, for example to get the same number of decimal places as the base values.

Note that other operations are possible this way, like AVG(), MAX() and MIN(). To retrieve a single value out of an array (or the only one), use the cell number and the array position in square brackets, e.g. R1C1[1].

Also note that Drill to Detail (DTD) will likely not work for aggregated values. The calculations only involve the totals, not the underlying records, therefore the latter are not combined.

### Keywords

KBA , LOD-SF-WFA-DES , Report Designer , How To