dbTalk Databases Forums  

SSAS 2005: Sort Dimension

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss SSAS 2005: Sort Dimension in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sqlster
 
Posts: n/a

Default SSAS 2005: Sort Dimension - 04-23-2006 , 09:37 PM






How do I sort month hierarchy in the time dimension? My months are displayed
as March, Jan, Feb. instead of Jan, Feb, March. The tutorials in ssas2k5 do
address this issue at the following link:
http://msdn2.microsoft.com/en-us/lib...8(SQL.90).aspx

But its not working for me.
Please help...
TIA..





Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: SSAS 2005: Sort Dimension - 04-24-2006 , 12:53 AM






Hi,

What attributes do you have included in your dimension and in the
relevant hierarchy?

Generally speaking, you can you the "OrderBy" property to order the
members in an attribute in a particular order: you can use the "Key",
which is the key column of the attribute, or the "AttributeKey", which
is the key column of another attribute which has a attribute
relationship with this attribute, or the "AttributeName", which will be
the member name of an attribute, again, with an attribute relationship
to this attribute.


Reply With Quote
  #3  
Old   
sqlster
 
Posts: n/a

Default Re: SSAS 2005: Sort Dimension - 04-24-2006 , 10:50 AM



Thanks for responding. Your suggestions were mentioned in the tutorial and I
did follow them but still the month hierarchy of the dimension would not sort
correctly. I don't know how to script out my cube code so that it would be
easy for us to see what I am doing wrong. Is there any online article that
would show how to script out the cube code?

TIA..

"yaniv.mor (AT) mail (DOT) com" wrote:

Quote:
Hi,

What attributes do you have included in your dimension and in the
relevant hierarchy?

Generally speaking, you can you the "OrderBy" property to order the
members in an attribute in a particular order: you can use the "Key",
which is the key column of the attribute, or the "AttributeKey", which
is the key column of another attribute which has a attribute
relationship with this attribute, or the "AttributeName", which will be
the member name of an attribute, again, with an attribute relationship
to this attribute.



Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default Re: SSAS 2005: Sort Dimension - 04-24-2006 , 07:24 PM



What are the key and name columns for your month attribute?
Also, when you're saying "month hierarchy" do you mean the month
attribute hierarchy or the month attribute included in a more elaborate
hierarchy?


Reply With Quote
  #5  
Old   
sqlster
 
Posts: n/a

Default Re: SSAS 2005: Sort Dimension - 04-24-2006 , 08:33 PM



Inside my CalendarTime dimension, I have attributes called Year, Quarter,
Trimester, Month etc. For the month attribute column info is as follows:

KeyColumns: CalendarTime.Month
NameColumn: Source: TableID: CalendarTime, ColumnID: Month

Month is my Month attribute included in a Hierarchy level.

If I could script out my entire cube, it would be very much easier to explain.

TIA...


"yaniv.mor (AT) mail (DOT) com" wrote:

Quote:
What are the key and name columns for your month attribute?
Also, when you're saying "month hierarchy" do you mean the month
attribute hierarchy or the month attribute included in a more elaborate
hierarchy?



Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default Re: SSAS 2005: Sort Dimension - 04-25-2006 , 10:45 PM



What you need to do is this:
If you don't have it yet, create a new column in your dimension table
(or you can create a new named calculation in your data source view)
which will represent the number figure of each month (January = 1,
February = 2 etc.). Add this new column as a new attribute in your time
dimension. Add this new attribute as an "Attribute Relationship" to
your "Month" attribute. Set the "OrderBy" property of the "Month"
attribute to "AttributeKey" and set its value to your newly created
"MonthValue" attribute (The [1,2,3....12] attribute). This should sort
your month members in the correct order.
Also, if the "Month" attribute is part of a more general hierarchy, you
may want to add the "Year" column as a key column to your "Month"
attribute, so each month within a year will be unique.

HTH,
Yaniv


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.