Database Reference
In-Depth Information
If you want to order the results based on SalesQuantity's numeric values, you can do so with the query
shown in Listing 14-34.
The first order function argument indicates the members to be sorted. The second argument indicates
the values to sort by. And the third argument indicates whether you want to sort them in ascending or
descending order.
Listing 14-34. he Order Function
-- Ordered by Sales Quantity, descending
Select
{ [Measures].[SalesQuantity] } On Columns,
{
Order( [DimTitles].[TitlesByPublisher].AllMembers
, [Measures].[SalesQuantity]
, Desc
)
} On Rows
From [CubePubsSales];
Figure 14-27 shows the results of the second query. As you can see, the values are now ordered sequentially
and in descending order, but they are still grouped based on each publisher.
Figure 14-27. The results of the last example in Listing 14-34
Search WWH ::




Custom Search