Author Topic: Sort column using alternate sort sequence column  (Read 961 times)

Offline ganesansgi

  • Associate
  • **
  • Posts: 4
  • Forum Citizenship: +0/-0
Sort column using alternate sort sequence column
« on: 24 Jan 2006 08:51:01 pm »
Is it possible to assign an alternate sort sequence to a columns in the model.
For example, I am showing sales by region and want to sort the output by
a predefined sequence instead of alphabetical order.  And, I want this
sort sequence to be automatically applied when the user chooses the 
Region column in the Query studio.

Thanks in advance

Offline CoginAustin

  • Community Leader
  • *****
  • Posts: 189
  • Forum Citizenship: +10/-0
Re: Sort column using alternate sort sequence column
« Reply #1 on: 25 Jan 2006 02:03:34 pm »
Add a new query item that has a CASE statement to figure out your new sort order.

Example

CASE [Field]
 WHEN 'Abc'
 THEN 'Group 1'
 When 'Def'
 THEN 'Group 2'
ELSE
 'Catch All Group'
END

Offline ganesansgi

  • Associate
  • **
  • Posts: 4
  • Forum Citizenship: +0/-0
Re: Sort column using alternate sort sequence column
« Reply #2 on: 26 Jan 2006 12:52:25 pm »
Let me rephrase my question so that I am being clearer.
In the framework manager, while defining a query subject
can I assign a different sort field for the query items. I want
a query like this to be generated

select region_name 
from region_dim
order by region_sort_sequence

Offline CoginAustin

  • Community Leader
  • *****
  • Posts: 189
  • Forum Citizenship: +10/-0
Re: Sort column using alternate sort sequence column
« Reply #3 on: 26 Jan 2006 01:43:54 pm »
Sort order is dictated by the report using the model not the model the report uses.

Offline KevH

  • Associate
  • **
  • Posts: 1
  • Forum Citizenship: +0/-0
Re: Sort column using alternate sort sequence column
« Reply #4 on: 08 Sep 2006 06:07:20 am »
Did you ever resolve this issue? I am suffering from similar in that the use of a sequence order element to sort by has been rejected by our business community. They want the sort to be implicit when the item is selected in a query studio report.

Any help would be greatly appreciated.

Kevin.