SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Help: creating named calculation for sorting


Help: creating named calculation for sorting

Author
Message
el_masry200
el_masry200
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 7
please help me
i need to create an Employee attribute (named calculation) that displays employees’ first and last names, but sorts their names by last name and then by first name
note i use analysis services 2008.
Mackers
Mackers
SSC Veteran
SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)

Group: General Forum Members
Points: 225 Visits: 499
Sounds a bit wierd...

Anyway, in your employee dim view create two columns - one that is Surname, FirstName & one that is FirstName Surname

Add these to your employee dimension (don't fortget to refresh the DSV) & hide the column you want to use as the sort (properties of the attruibute --> AttributeHierchyVisible --> False). Do you have an employee id? If so I would make that the key of the attrubutes

In the attribute relationship make your sorting column an attribute of your reporting column.

In the properties of the reporting column, change the OrderBy property to be AttributeName and OrderByAttribute to be the reporting column

Mack
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search