This post is copy from http://gumper.com, a unique website coz it’s only have one item….

The basic script of Multi Dimensional Expression (MDX). It’s very usefull for developer to build some scenarios in a CUBE.

thank you,

hope it’s ok i copied all the page.

MDX Expressions
Function Requires Returns
CurrentMember Dimension Member
PrevMember Member Member
NextMember Member Member
Lag Numeric Expression Member
Lead Numeric Expression Member
ParallelPeriod Level, numeric expression, member Member
PeriodsToDate Level, member Set
YTD Member Set
MTD Member Set
Sum Set, numeric expression Number
 
Navigating the Hierarchy
Function Requires Returns
Parent Member Member
Children Member Set
FirstChild Member Member
LastChild Member Member
Descendants Member, level or member, distance Set
Ancestor Member, level or member, distance Member
Siblings Member Set
FirstSibling Member Member
LastSibling Member Member
Cousin Member, ancestor member Member
 
Data Analysis
Function Requires Returns
Sum Set, numeric expression Number
Count Set Integer
Avg Set, numeric expression Number
Tail Set, count Set
Item Set, index number Member
OpeningPeriod Level, member Member
ClosingPeriod Level, member Member
Max Set, numeric expression Number
Min Set, numeric expression Number
 
Moving Averages
Function Requires Returns
Level Member Level
Members Level or dimension Setr
Iif Condition, what to do if true, what to do if false Number or string
 
Filters
Function Requires Returns
Filter Set, condition Set
IsEmpty Expression Boolean
 
Member Properties
Function Requires Returns
Properties Member name String
Val (VBA Function) String Numeric value
 
Aggregates
Aggregate function Returned value
Sum The sum of the input values
Min The lowest of the input values
Max The highest of the input values
Count The number of input values
Distinct Count The number of unique input values
 
Example MDX Calculations
Sales Growth
PP Growth
YTD Sales
YTD Sales Using PeriodsToDate
Product Percentage
Product Total Percentage
Average Stock – Brute Force
Average Stock – Elegant
Closing Period – Brute Force
Closing Period – Elegant
Max for Period
Min for Period
Moving Average
Products Down
Dynamic Custom Default Member
Properties Query
Products Down Query
MDX Query

Terimakasih!