COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: katdbc on 29 Mar 2011 06:53:17 PM

Title: How to sort a column in a customized way ,as requested by my director
Post by: katdbc on 29 Mar 2011 06:53:17 PM
I have a column called PDT and it has  6 values(cpm,eadc,epm,others, rm, security) and  when i display, it is sorted in a default way and 'others' come in the middle and they want that pdt in the last

But my manager wants
1.cpm
2.rm
3.security,
4.epm
5.eadc
6. others   in the last row.


this is neither in the asc or dsc order .How can i arrange these six rows in this particular order for my  Director.

Im a beginner an i really dont have time to  search also.Can somebody help me.Thank you so much cognoise members
Title: Re: How to sort a column in a customized way ,as requested by my director
Post by: jcrouch on 29 Mar 2011 07:17:45 PM
Hi,

This is fairly easy to do.

1. Add a data item to your query and name it PDTSort or whatever you want. Set the data item's expression definition to:

Case ([PDT])
When 'cpm' Then '1'
When 'rm' Then '2'
...
When 'others' Then '6'
End

Then just sort by that field Ascending.
Title: Re: How to sort a column in a customized way ,as requested by my director
Post by: katdbc on 29 Mar 2011 08:30:23 PM
Thank you so much...Il try this and will let you know