Returns either the numeric or the string value of a Multidimensional Expressions (MDX) expression evaluated over the specified calculation pass of a cube.
Numeric syntax CalculationPassValue(Numeric_Expression,Pass_Value [, ABSOLUTE | RELATIVE [,ALL]]) String syntax CalculationPassValue(String_Expression ,Pass_Value [, ABSOLUTE | RELATIVE [,ALL]])
A valid numeric expression that is typically a Multidimensional Expressions (MDX) expression of cell coordinates that return a number.
A valid string expression that is typically a valid Multidimensional Expressions (MDX) expression of cell coordinates that return a number expressed as a string.
A valid numeric expression that specifies the calculation pass number.
An access flag value that specifies that the Pass_Value parameter contains the zero-based index of the calculation pass. ABSOLUTE is the default access flag value if no access flag value is specified.
An access flag value that specifies that the Pass_Value parameter contains a relative offset from the calculation pass of the triggering calculation. If the offset resolves into a calculation pass index less than 0, calculation pass 0 is used and no error occurs.
When this flag is set, all values are null except for those loaded by the storage engine. When not set, the values are aggregated without any calculations applied.
If a numeric expression is provided, the function returns a numeric value by evaluating the specified MDX numeric expression in the specified calculation pass, and optionally modified by an access flag and an access flag modifier.
If a string expression is provided, the function returns a string value by evaluating the specified MDX string expression in the specified calculation pass, and optionally modified by an access flag and an access flag modifier*.*
This function is used in conjunction with IIf (MDX) and CalculationCurrentPass (MDX) in Microsoft SQL Server 2000 Analysis Services to handle recursion issues. However, with automatic recursion resolution in SQL Server 2005 Analysis Services, this function has little practical use.
Only administrators can use the CalculationPassValue function within an MDX script. An error occurs if an MDX script that contains this function is run in the context of a role that does not have administrator privileges.
Help and Information
17 July 2006