MDX script properties
| name | value |
|---|
| name | MdxScript
|
| description |
|
| id | MdxScript
|
Calculation properties
| reference | comment | type | measure group | display folder |
|---|
| [Measures].[Growth in Customer Base]
|
| Member
| |
|
| [Measures].[Internet Average Sales Amount]
|
| Member
| |
|
| [Measures].[Internet Average Unit Price]
|
| Member
| |
|
| [Measures].[Internet Gross Profit Margin]
|
| Member
| |
|
| [Measures].[Internet Gross Profit]
|
| Member
| |
|
| [Measures].[Internet Ratio to All Products]
|
| Member
| |
|
| [Measures].[Internet Ratio to Parent Product]
|
| Member
| |
|
| Core Product Group
|
| Set
| | Sets
|
| Long Lead Products
|
| Set
| | Sets
|
| New Product Models FY 2002
|
| Set
| | Sets
|
| New Product Models FY 2003
|
| Set
| | Sets
|
| New Product Models FY 2004
|
| Set
| | Sets
|
Commands
/*-- Aggregate leaf data -----------------------------------------------*/
Calculate ;
/*-- Set default member for the Destination Currency cube dimension ----*/
Alter Cube
CurrentCube
Update Dimension [Destination Currency].[Destination Currency],
Default_Member = [Destination Currency].[Destination Currency].[US Dollar] ;
/*-----------------------------------------------------------------------------
| Internet Sales Calculations |
-----------------------------------------------------------------------------*/
Create Member CurrentCube.[Measures].[Internet Gross Profit]
As [Measures].[Internet Sales Amount] -
[Measures].[Internet Total Product Cost],
Format_String = "Currency",
Non_Empty_Behavior =
{
[Internet Sales Amount],
[Internet Total Product Cost]
} ;
Create Member CurrentCube.[Measures].[Internet Gross Profit Margin]
As ( [Measures].[Internet Sales Amount] -
[Measures].[Internet Total Product Cost] )
/
[Measures].[Internet Sales Amount],
Format_String = "Percent",
Non_Empty_Behavior =
{
[Internet Sales Amount],
[Internet Total Product Cost]
} ;
Create Member CurrentCube.[Measures].[Internet Average Unit Price]
As [Measures].[Internet Unit Price] /
[Measures].[Internet Transaction Count],
Format_String = "Currency",
Non_Empty_Behavior = [Internet Unit Price] ;
Create Member CurrentCube.[Measures].[Internet Average Sales Amount]
As [Measures].[Internet Sales Amount] /
[Measures].[Internet Order Count],
Format_String = "Currency" ;
Create Member CurrentCube.[Measures].[Internet Ratio to All Products]
As [Measures].[Internet Sales Amount]
/
(
Root( [Product] ),
[Measures].[Internet Sales Amount]
),
Format_String = "Percent",
Non_Empty_Behavior = [Internet Sales Amount] ;
Create Member CurrentCube.[Measures].[Internet Ratio to Parent Product]
As Case
When [Product].[Product Model Categories].CurrentMember.Level.Ordinal
= 0
Then 1
Else [Measures].[Internet Sales Amount]
/
( [Product].[Product Model Categories].CurrentMember.Parent,
[Measures].[Internet Sales Amount] )
End,
Format_String = "Percent" ;
Create Member CurrentCube.[Measures].[Growth in Customer Base]
As Case
When [Date].[Fiscal].CurrentMember.Level.Ordinal = 0
Then "NA"
When IsEmpty
(
(
[Date].[Fiscal].PrevMember,
[Measures].[Customer Count]
)
)
Then Null
Else (
[Measures].[Customer Count]
-
( [Date].[Fiscal].PrevMember, [Measures].[Customer Count] )
)
/
( [Date].[Fiscal].PrevMember,[Measures].[Customer Count] )
End,
Format_String = "Percent" ;
Create Set CurrentCube.[New Product Models FY 2002]
As Exists
(
[Product].[Model Name].[Model Name].Members,
[Product].[Start Date].&[2001-07-01T00:00:00]
) ;
Create Set CurrentCube.[New Product Models FY 2003]
As Exists
(
[Product].[Model Name].[Model Name].Members,
[Product].[Start Date].&[2002-07-01T00:00:00]
) ;
Create Set CurrentCube.[New Product Models FY 2004]
As Exists
(
[Product].[Model Name].[Model Name].Members,
[Product].[Start Date].&[2003-07-01T00:00:00]
) ;
Create Set CurrentCube.[Long Lead Products]
As Exists
(
[Product].[Model Name].[Model Name].Members,
[Product].[Days to Manufacture].&[4]
) ;
Create Set CurrentCube.[Core Product Group]
As DrillDownMember
(
[Product].[Product Categories].[Category].Members,
[Product].[Product Categories].[Category].[Bikes]
) ;