You can define a calculated member with one of three scopes:
The calculated member can be used only within the query in which it is defined. Use the WITH clause in the SELECT statement. For more information, see Using WITH to Define Calculated Members, Sets, and Cache.
The calculated member can be used only within the session in which it is defined, but can be used by multiple queries. Use the CREATE MEMBER statement. For more information, see CREATE MEMBER.
The calculated member can be used by any query and session connected to the server. The calculated member definition is stored (but its data is not). For more information about creating calculated members with global scope, see Creating Calculated Members.
A calculated member can be persisted in a local cube if a CREATE MEMBER statement is specified in the COMMAND clause of the CREATE CUBE statement.
CREATE CUBE MYWAREHOUSE
(
DIMENSION . . .
. . . ,
COMMAND [CREATE MEMBER [MYWAREHOUSE].[MEASURES].[WAREHOUSEPROFIT]
AS '[MEASURES].[WAREHOUSE SALES] - [MEASURES].[WAREHOUSE COST]']
)