Databases Reference
In-Depth Information
OpeningPeriod ( [Level_Expression [ , Member_Expression] ] )
is an MDX function that takes an argument that can specify
both level_expression with member_expression or just the mem-
ber_expression itself. This is most often used with Time dimen-
sions, but will work with other dimension types. This function re-
turns the first member at the level of the member_expression;
for example, the following returns "Day 1":
OpeningPeriod (Day, [April])
Set Functions
Set functions, as the category title suggests, operate on sets. The take
sets are arguments and often the result of the set functions is a set.
Some of the widely used set functions are Crossjoin and Filter which we
are quite sure you would be using in your MDX queries. Hence these two
functions are discussed here with examples.
Crossjoin returns all possible combinations of sets as specified by the arguments
to the crossjoin function. If there are N sets specified in the crossjoin function, this
will result in a combination of all the possible members within that set on a single
axis. You see this with the following example:
Crossjoin ( Set_Expression [ , Set_Expression ...] )
SELECT Measures.[Internet Sales Amount] ON COLUMNS,
CrossJoin ( {Product.[Product Line].[Product
Line].MEMBERS},
{[Customer].[Country].MEMBERS}) on ROWS
FROM [Adventure Works]
This query produces the cross product of each member in the Product
dimension with each member of the Customer dimension along the sales
amount measure. Following are the first few rows of results from ex-
ecuting this query:
Search WWH ::




Custom Search