Back to Declic Consulting web site.. How to sort dimension members in DESCending order

How to sort dimension members in DESCending order

by patricet28 28. December 2008 20:43

Analysis Services does not provide a way to sort dimension members in DESCending order, only in ASCending order.

Fortunately, this sort functionality is easy to implement, using the Data Source View.

Replace your table binding with a named query and create a new calculated column that you will use to order your dimension members.

Here is an example of such query:

SELECT DateKey, (-1)*CONVERT(int, Date, 112) as Days, Date FROM T_DATE

Where 'DATE' is your datetime column and 'DATEKEY' is your primary key.

Then, in the dimension definition, select the dimension key and set the following properties:

OrderBy: AttributeKey

OrderByAttribute: Days

 

And voilà, your dimension members are now ordered by the new attribute you created!

 

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

TextBox

Tag cloud

RecentPosts