Database Reference
In-Depth Information
From [CubePubsSales];
GO
Select
{ [Measures].[SalesQuantity] } On Columns,
{ NonEmpty(
CrossJoin ( [DimDates].[Year].AllMembers
, [DimTitles].[TitlesByType].[Title].AllMembers
)
) } On Rows
From [CubePubsSales];
naturally, a number of null values will be returned when using this function. For instance, if a title did not
sell in a particular year, the results returned will be a null value. Because of this, it is common to combine a cross
join operator with the NonEmpty function as we did in Listings 14-31 and 14-32.
Tip
Joining More than Two Dimensions
It is possible to combine results from more than two dimensions at a time. In Listing 14-37 we combine results
from the Years, Titles, and Stores dimensions. The code results are shown directly after the listing in Figure 14-30 .
Both queries return the same result.
Figure 14-30. The results of the last example in Listing 14-37
 
 
Search WWH ::




Custom Search