BO Input and Output Contexts

  • Upload
    a567786

  • View
    249

  • Download
    0

Embed Size (px)

Citation preview

  • 8/14/2019 BO Input and Output Contexts

    1/2

    Using Dimensions in Input and Output Contexts

    BusinessObjects (BO) performs calculations in reports.To determine the result ofan aggregate calculation BO defines an input context and an output context .Context :A context is made up of one or more dimensions.

    Input context:

    A formulas input context consists of the dimensions that feed into the formula.Input Context consists of one or more dimensions that are used in calculation.

    Output Context:

    A formulas output context causes the formula to output a value .Output Context consists of one or more dimensions that determine the result of the calculation.

    IN, FORALL, FOREACH

    Using Context Operators in Input Contexts

    In previous examples you have used the In context operator to specify dimension(

    s) to include in the input and output contexts. BusinessObjects XI provides twoadditionalcontext operators that can be used in extended syntax:

    ForEach The ForEach context operator allows you to add dimensions to the currentdefault input context. For example, if a table contains the dimensions [Year]and [Quarter] and the measure [Revenue], the default context is [Year]; [Quarter]. In the following example, the ForEach context operator is used to add the [SalesPerson] dimension to the context (without adding [Sales Person] to the table):

    =Min([Revenue] ForEach ([Sales Person])) In ([Year])

    This would be the same as explicitly listing all of the dimensions as follows:=Min([Revenue] In ([Year];[Quarter];[Sales Person])) In ([Year])

    ForAll The ForAll context operator allows you to remove a dimension from the current default input context. For example, if a table contains the dimensions [Year],[Quarter] and [Sales Person] and the measure [Revenue], the default context is [Year]; [Quarter]; [Sales Person]. In the following example, the ForAll contextoperator is used to remove the [Sales Person] dimension from the context (without removing [Sales Person] from the table):

    =Min([Revenue] ForAll ([Sales Person])) In ([Year])

    This would be the same as explicitly listing all of the dimensions as follows:=Min([Revenue] In ([Year];[Quarter])) In ([Year])

    ----------------Difference between &

    ForEach is used to make include a dimension in a context. The calculation context is still affected by other values in the block.

    ForAll is used to exclude a dimension from a context. Other dimensions of the bl

  • 8/14/2019 BO Input and Output Contexts

    2/2

    ock will still be considered. Adding or removing values from a block might change the value, but it will always ignore the ForAll items.