Database Reference
In-Depth Information
SELECT
NONEMPTY(CROSSJOIN(CROSSJOIN([Promotion].[Promotions].[Category].members,
[Reseller].[Reseller].[all
resellers].children), product.[product
categories].category.members)) ON 1,
measures.[reseller sales amount] ON 0
FROM [Adventure Works]
WHERE
[Date].[Calendar].[Month].&[2008]&[5]
Tip
MDX is not case sensitive. There is no performance advantage for using
one format over another, but I generally prefer to type all the functions in
uppercase.
6. As you learned, using the NONEMPTY function generally yields results faster
than the NON EMPTY keywords. Yet another alternative for removing empty
tuples is the NONEMPTYCROSSJOIN function. This function has limitations
when working with calculated members and is deprecated. However, you
might see references to it in the legacy code. Consider the following query:
SELECT
NONEMPTYCROSSJOIN([Promotion].[Promotions].[Category].members,
[Reseller].[Reseller].[all
resellers].children, product.[product
categories].category.members,
measures.[reseller sales amount], 3) ON
1,
measures.[reseller sales amount] ON 0
FROM [Adventure Works]
WHERE
[Date].[Calendar].[Month].&[2008]&[5]
Search WWH ::




Custom Search