Each option can result in different values (please reference the attached workbook at the bottom of this article and additional resources section for specific examples).
Wrap all fields in an aggregation.
Sample (not using LOD):
[Profit] / SUM ([Sales]) -> SUM ([Profit]) / SUM ([Sales])
Sample (using LOD):
RANK( {fixed: SUM([Sales])} ) --> RANK( SUM( {fixed: SUM([Sales])} ))
Remove aggregations from all of the fields.
Sample (not using LOD):
[Profit] / SUM ([Sales]) ->[Profit] / [Sales]
Sample (using LOD):
[Profit] / SUM ([Sales]) ->[Profit] / { fixed: SUM ([Sales]) }
Move the aggregation so the calculation is aggregated.
For example, the calculation:
IF [Row ID] = 1
THEN SUM( [Sales] )
END
could become:
SUM(
IF [Row ID] = 1
THEN [Sales]
END )
Use a Level of Detail (LOD) Expression to make an aggregation non-aggregate. All LOD expression return non-aggregated values.
[Sales]/SUM( [Sales] ) -> [Sales]/{FIXED: SUM( [Sales] )}
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
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 |
Formula:
SUM ([Profit]) / SUM ([Sales])
Result:
(100 + 50 + 7) / (30 + 60 + 10) = 157/100 = 1.57
[Profit] / [Sales]
Result: (assuming that the aggregation in the view is SUM)
100/30 + 50/60 + 7/10 = 3.333 + .833 + .7 = 4.867
Result:
30 + 0 + 0 = 30
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
001473080
19 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.