COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: newbeecognos on 21 Jun 2013 03:23:26 PM

Title: Dynamic Sorting in Cognos
Post by: newbeecognos on 21 Jun 2013 03:23:26 PM
Hello,

I am fairly new at Cognos Report Studio.
I wanted to know how you can sort a particular column on its values, like if I have a column named Campus, and the values are Texas, New Jersey, Alabama, Florida, Main, South Carolina and I want to sort it alphabetically but Main the as the last item as below:
Alabama
Florida
New Jersey
South Carolina
Texas
Main
like so, How is it possible in report studio?

Thanks in advance,
NBC

Title: Re: Dynamic Sorting in Cognos
Post by: blom0344 on 21 Jun 2013 04:45:40 PM
You define a premier sorting item:

CASE WHEN [STATE] <> 'Main' THEN 1 ELSE 2 END

Now associate this new item with the list properties and add a detail sorting to the list. First sort on the new item, then on [STATE],  et voila..