Wednesday, July 18, 2012

MDX Learning Notes

Reading Microsoft SQL Server 2008 MDX Step by Step (great book)
-----------------------------------------------------------
On 0 = On Columns
On 1 = On Rows

The default properties returned are VALUE and FORMATTED_VALUE for  cell. To retreive additional properties by including CELL PROPERTIES keyword in end of query.

 Cell Property           Description
-----------------------------------------------------------
ACTION_TYPE -- A bitmask indicating the type of action(s) associated with the cell.
BACK_COLOR -- A bitmask indicating the background color to use when displaying the VALUE or
                               FORMATTED_VALUE property of the cell.
CELL_ORDINAL -- The ordinal number of the cell in the cell set.
FONT_FLAGS -- A bitmask indicating whether the cell’s font should be presented using italic,
                             bold, underline, or strikeout detailing.
FONT_NAME -- The name of the font to use when displaying the VALUE or FORMATTED_VALUE property of the cell.
FONT_SIZE -- The font size to use when displaying the VALUE or FORMATTED_VALUE
property of the cell.
FORE_COLOR -- A bitmask indicating the foreground color to use when displaying the VALUE or
                             FORMATTED_VALUE property of the cell.
FORMAT --  This is the same as the FORMAT_STRING property.
FORMAT_STRING  -- The format string used to create the value of FORMATTED_VALUE
                                      property of the cell.
FORMATTED_VALUE -- The character string representation of the VALUE property formatted per
                                            the FORMAT_STRING value.
LANGUAGE -- The locale against which the FORMAT_STRING will be applied.
UPDATEABLE --  A value indicating whether the cell can be updated.
VALUE -- The unformatted value of the cell.

For Partial Tuples order....
1. Default Member
2. All Member
3. First Member

A set is a more than one tuple enclosed in braces {}.
Tuples are separted by commas.
Shared hierarchality and shard dimensionality is a requirement for inclusion within the set.

Order( {Set}, Expression [, Flag])
Flags can be ASC (default) ascending
DESC descending
BASC ascending across all members ( sort by measure only)
BDESC descending across all members ( sort by measure only)
























No comments:

Post a Comment