Assignment example: Assigning with a member reference
In addition to literal values, an assignment expression can use member references and operators.
The following example shows an assignment that is based on an operator-driven calculation that uses a member reference. The example assigns the result of the calculation to the dimensional intersection that the SCOPE expression defines, referenced by the keyword THIS.
//
// SCOPE expression
//
SCOPE (
[Account].[Corporate].[Marketing].LeafMembers,
[BusinessProcess].[Standard].[INPUT],
[Currency].[All Members].[USD]
[Entity].[ResortOps].[Resort - Tahoe]
// Scenario dimension is forecast
[Scenario].[All Members].[Forecast]
// Time dimension is January 2001
[Time].[Monthly].[Month 1 Year 2001],
// Product dimension indicates ski tuning
[Product].[ResortProducts].[Ski Tuning]
);
//
// Statement that makes actual assignment
// Member reference is ([Scenario].[All Members].[Budget])
//
THIS = ([Scenario].[All Members].[Budget]) * 10;
END SCOPE;