Hey Guys,
Here i would like to explain three main concept:unique names, tuples, and sets.
Unique Names:
- All objects in MDX, from cubes to dimensions to hierarchies, levels and members, have unique names
- These are the names you should use when writing MDX to uniquely identify an object in a cube
Tuples:
- A tuple is a way of referring to a single value within a cube
- If you think of a cube as a gigantic multidimensional array, a tuple is a co-ordinate to one cell within that array.
- Tuples are written as comma-delimited lists of members, from one or more different hierarchies,
- and are surrounded by round brackets: ()
Example:
([MEASURES].[sale Amount],[DATE].[Calendar].[Calendar Year].&[2014])
Sets:
Sets:
- A set is an ordered list of members, or tuples, surrounded by curly brackets: {}
- Each item in a set has to be the same type of a thing: for a set of members, each member has to be from the same hierarchy
- Sets are used to define what appears on the rows and columns of an MDX query, and are also used in calculations
Example:
1) {[Date].[Date].&[20110702],
1) {[Date].[Date].&[20110702],
[Date].[Date].&[20110703],
[Date].[Date].&[20110704]}
Valid set member of date hierarchy from date dimension
2){[Date].[Date].&[20110702],
2){[Date].[Date].&[20110702],
[Date].[Date].&[20110703],
[Date].[Date].&[20110704],
[Date][Calendar][Date].&[]20110709}
Not a valid set because here date level is calendar hierarchy from date dimension and every thing else is member of date hierarchy from date dimension so its not valid set.
Not a valid set because here date level is calendar hierarchy from date dimension and every thing else is member of date hierarchy from date dimension so its not valid set.
Cheers !!!!!
Sumit Bansal
BI Developer