The calculation context is the set of data that a calculation uses to generate a result.
The value of a measure depends on the dimensions used in its calculation.
A calculation has both an input context and an output context. You can specify neither, either one, or both.
- The input context is the set of dimensions used to perform the calculation.
- The output context is a set of dimensions that acts as a break in the calculation. It causes the calculation to return values as if they appear in the footer of a table break.
Defining which dimensions are used to generate a measure is called setting the calculation context.
Input Calculation Context: Forcing
The input context for a measure or formula is the list of dimensions that you use in the calculation.
The list of dimensions in the input context appears inside the parentheses of the function that returns the value. You must enclose the list of dimensions in parentheses, even if it contains only one dimension. Separate each dimension with a semicolon.
You have a report that shows sales revenue by state and year, with a section for state.
If you want to display the maximum revenue by state, you can do so by specifying the input context in a formula.

In this case, use the following formula:
=Max([Sales revenue] In ([State];[Year]))
The dimensions in the input context appear inside the parentheses of the function.
![The formula =Max([Sales revenue] In ([State]; [Year])) returns each state’s highest yearly revenue, $2,992,679 for California and $843,584 for Colorado. The formula =Max([Sales revenue] In ([State]; [Year])) returns each state’s highest yearly revenue, $2,992,679 for California and $843,584 for Colorado.](https://learning.sap.com/service/media/topic/c9ba480a-66f4-43e4-9171-ec4379825421/BOW520_2025_en-US_media/BOW520_2025_en-US_images/ForcingInContextSol.png)

