Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Analysis Services (2000)
 Wrong Chronological ordering - MDX help

Author  Topic 

MariaLua
Starting Member

5 Posts

Posted - 2004-12-31 : 05:51:01
Hi all

I am having quite a frustrating problem. I have an MDX statement that looks like this:

SELECT { Measures.members } on Columns ,
NON EMPTY {{[Business].[User].[Business Entity Id].[1583].Children}
* {[Time].[Calendar].[2002].[Quarter 2].[May]:
[Time].[Calendar].[2004].[Quarter 3].[July]}} on Rows
FROM UsageStats_Phase1

It will produce a report (using the Matrix report in .NET) that will show me all the users within Business Entity ID 1583 listed down along the left-hand side of the report, then along the top of the report it shows all the months specified within the range in the MDX statement. The actual grid of the report shows the amount of visits a user had to a website grouped according to the months, i.e.


-------------------------------------
..............|..2002...|..2003..|TOT|
..............|Nov|Dec|Jan|Feb|......|
Bob Smith |_3_|_2_|_1_|_6_|.....|
Jon Smith |_4_|_8_|_3_|_3_|.....|
Hal Smith |_6_|_1_|_1_|_2_|.....|
-------------------------------------

My Time dimension for the report above is Year, Quarter,Month, Day.
The problem is that, when running the report from .NET Reporting Services, the dates are not coming out in correct chronological order! All months are showing up in the correct years, but the months aren't ordered correctly within the years. So March may come before January, or December may show up before November.

I have tried updating the Matrix report so that is also includes a field for Quarter, and not just for Year and Month (as in the report above). This has made a slight improvement, but there is still the odd month showing up in the wrong order. This makes me think the problem will need to be solved in the actual MDX statement. Does anyone have any ideas or suggestions as to how to order this correctly?

Any little suggestion will be most appreciated!!!

Thanks in advance,
Maria


***************
   

- Advertisement -