Context is what makes aggregations of data display and behave in a certain way.
It is this feature that makes the dynamic nature of measures possible. When dimensions are removed from or added to a block/table, the context changes and the measure/dimension amounts can also change.

Context comes in two major types:
Default Context: what ETO Results does automatically.
Calculation Context: An override of what ETO Results does by you, the report writer.

Default Context

Default context is the level of aggregation or inflation when adding objects to a table that comes with ETO Results. It is useful when looking at distinct data, where all the objects you need for it to display the correct number are already in the table, cell, or variable.

Calculation Context

Calculation context is a way of overriding the default context, which can be done with either input or output context. It is useful for achieving the correct aggregation of data, without having to have all of the objects it references in the same table, cell, or variable.

Input Context

Input context determines what objects are taken in to the calculation. An                       example of input context in a formula:

=Sum([Object from TouchPoint] In ([Participant Site Identifier];[Response                           Identifier]))

• The In operator is the input context.

• The formula above is saying, "The result of my calculation should display the sum of my object for every participant site ID and response ID

• Input context generally tells ETO Results what to take into considerations before aggregating the data.

Output Context

Output context determines the output level, by which the calculation is output.              An example of output context in a formula:

=Max ([Object from TouchPoint]) In ([Participant Site Identifier])

• The In operator was used outside of the parentheses to create output context.

• The formula above is saying, "I need this formula to put out the maximum number for each participant. "

• Output context tells ETO Results where that value should be "attached" in the report. This says, "When you get this value/aggregation, make sure to attach that to the participant."

How to Tell Which is Which
Is the operator inside, or outside of the function parentheses? This can be mapped out like this:

=Aggregate Function ([Object] Input Context) Output Context

In the example below, there are 2 sets of parentheses:
=Max ([Object in TouchPoint) In ([Participant Site Identifier])

This is output context because the close parentheses that is used by the Max() function comes before the "In ([Participant Site Identifier])" context.

Syntax Operators

Syntax operators are the operators that you may see in both input and output context. They are functions that assist in solving the context problems.

In: specify exactly which dimensions you want in the context
ForEach: uses dimensions in the table around it to adjust the context
ForAll: excludes dimensions in the table around it to adjust the context
Where: limits or filters the data returned