• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Sorting column by personal order

Hi, I would like to sort a column of text values based on my own personal order (i.e. not alphabetical).  How can I do that?  Thanks.
1 Solution
Do you have access to edit the view?

If so, you can create a hidden column and place it as the first column in the view.  Set the column to sort Ascending.  For the formula of the column, you can use the following:

@Member(<your field name goes here>; "<value1>":"<value2>":"<value3>":"<value4>":"<etc>");

That formula basically uses the value in a field you choose and tries to find it in the list you provide.  The formula returns the position in that list, which will become the sort order for that row of the view.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now