### Additional Information

# How to determine if a field is aggregated.

Imported fields from the underlying data and Level of Detail (LOD) expressions are always non-aggregated until they are wrapped in an aggregation, such as SUM(), MIN(), ATTR(). To see a full list of all aggregated functions, please look at the "Aggregate Functions" article in the related links section.

Calculated fields can be either aggregate or non-aggregate depending on how aggregations are used. If no aggregations are used, or if the outer most expression is a LOD expression, then the calculation will return non-aggregated results.

One trick to determine if a field is aggregated is to add the field into the view. If the field displays AGG("Field Name"), the field is already aggregated

Examples:

Below is an explanation of how each option works using the sample data set shown as a reference.

Sample Data Set
Row ID | Profit | Sales |
---|

1 | 100 | 30 |

2 | 50 | 60 |

3 | 7 | 10 |

Option 1

Formula:

SUM ([Profit]) / SUM ([Sales])

Result:

(100 + 50 + 7) / (30 + 60 + 10) = 157/100 = 1.57

### Option 2

[Profit] / [Sales]

Result: (assuming that the aggregation in the view is SUM)

100/30 + 50/60 + 7/10 = 3.333 + .833 + .7 = 4.867

### Option 3

Result:

30 + 0 + 0 = 30

### Option 4

See **Level of Details Calculations **

Level of Detail expressions always return non-aggregate results and can be used to specify the level the aggregation occurs at.

[Sales]/{FIXED: SUM( [Sales] )}

Result: (assuming that the aggregation is sum)

30/100 + 60/100 + 10/100 = 3+60+10 = .3 + .6 + .1 = 1

Discuss this article...