Database Reference
In-Depth Information
Tip
The
CurrentMember
function must follow a hierarchy and is essential
for navigating SSAS hierarchies.
4. Use the
NON EMPTY
keywords or the
NONEMPTY
function to remove empty
cells from the results, as the following two queries demonstrate:
SELECT [Measures].[Reseller Sales Amount]
ON 0,
NONEMPTY ([Date].[Calendar].[Calendar
Year].members) ON 1
FROM [Adventure Works]
SELECT [Measures].[Reseller Sales Amount]
ON 0,
NON EMPTY [Date].[Calendar].[Calendar
Year].members ON 1
FROM [Adventure Works]
Tip
I recommend using the
NONEMPTY
function because it outperforms the
NON EMPTY
keywords. The
NONEMPTY
function can take either one or
two sets as the input, and you can nest multiple occurrences of this func-
tion if necessary.
5. As mentioned earlier you could nest the
CROSSJOIN
functions to generate a
more complex set. You can still use the
NONEMPTY
function to remove unne-
cessary content from the result set. The only difference is that in this case,
you'll be removing empty tuples rather than empty cells, as shown by the next
query:
Search WWH ::
Custom Search