CalculationPassValue
Returns the value of a Multidimensional Expressions (MDX) expression evaluated over the specified calculation pass of a cube.
Syntax
Numeric
CalculationPassValue(«Numeric Expression», «Pass Value»[, «Access Flag»])
The CalculationPassValue function returns a numeric value, evaluating the MDX numeric expression specified in «Numeric Expression» in the calculation pass specified in «Pass Value», optionally modified by an access flag specified in «Access Flags».
String
CalculationPassValue(«String Expression», «Pass Value»[, «Access Flag»])
The CalculationPassValue function returns a string value, evaluating the MDX string expression specified in «Numeric Expression» in the calculation pass specified in «Pass Value», optionally modified by an access flag specified in «Access Flags».
Remarks
The behavior of the «Pass Value» parameter can change depending on the content of the «Access Flag» parameter. The following table details the access flags allowed in the «Access Flag» parameter.
Access flag | Description |
---|---|
ABSOLUTE | The «Pass Value» contains the zero-based index of a calculation pass. |
RELATIVE | The «Pass Value» contains a relative offset from the current calculation pass. If the offset resolves into a calculation pass index less than 0, calculation pass 0 is used; no error occurs. |
Example
Numeric
The following example returns the value of [Sales]
from calculation pass 0:
CalculationPassValue([Sales], 0)
String
The following example returns the full name of the [Sales]
member from the previous calculation pass 0:
CalculationPassValue(MemberToStr([Sales]), -1, RELATIVE)