View Full Version : Order by numeric value

10-04-2003, 12:18 AM
In the sample application, sorting rows by sales count results in a table where rows are sorted alphabetically instead of numerically, i.e. 16414 is smaller than 7978. Do I need to modify the query, or is this a bug/limitation of the query engine?
select {[Measures].[Sales Count]} ON columns,
Order(Hierarchize(Union({[Product].[All Products]}, [Product].[All Products].Children)), [Measures].[Sales Count], ASC) ON rows
from [Sales]
where [Time].[1997]

10-08-2003, 08:35 AM
I get the following, which is correct:
[Time].[1997] [Measures].[Sales Count]
[Product].[All Products] 86,837
[Product].[All Products].[Drink] 7,978
[Product].[All Products].[Non-Consumable] 16,414
[Product].[All Products].[Food] 62,445
What version/database/operating system/user interface/tomcat etc. are you using? Do your cell values appear with commas (e.g. 7,978) as above?