Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Order By for dimension Expand / Collapse
Author
Message
Posted Wednesday, April 28, 2010 12:20 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, May 02, 2013 10:58 AM
Points: 59, Visits: 222
I have a dimension table with 2 columns - ID (the PK, an INT) and Description (Char()). I want to display it in order of key not description. I tried changing the KeyColumns property from the description to the ID , but that also changed what was displayed.
I've got it to work for a time dimension to order e.g. the months correctly, but for this simple dimension - with no hiererachy and only 2 columns - I can't get it working. I tried playing with NameColumn & ValueColumn but that didn't work either. I'm sure it's something pretty simple.



Post #912275
Posted Thursday, April 29, 2010 1:45 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, September 03, 2010 5:15 AM
Points: 57, Visits: 83
Hi Paul,

Indeed, unless I misunderstand you, it is something pretty simple.

You can set the way your dimension attributes (like month in a time dimension) are ordered by uisng the attributes "OrderBy"-property. Select 'Key' or Name' ', whatever fits best.

Hope that helps,

Kind Regards,

Cees
Post #912597
Posted Thursday, May 13, 2010 4:09 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, May 02, 2013 10:58 AM
Points: 59, Visits: 222
I don't know why, but not only did I have to change the Order By Key, but also had to set the NameColumn and the ValueColumn in order to retain the correct display values. But this allowed me to display the description to the user, while using the PK to order results by


Post #921664
Posted Monday, May 24, 2010 12:37 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, December 26, 2012 12:43 PM
Points: 1,330, Visits: 455
May be below link can help you:

Sort Dimension Members in DESCending order


Cheers,
Hari
Tips & Tricks for SQL BI Developers
Post #926632
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse