IBM Support

How to sort on a specific column in a crosstab

Question & Answer


Question

In the example below how to sort the crosstab on the Mail values column

Answer

Here is an example of a crosstab using Cognos samples

To sort the crosstab on the Mail values column, first define the following query calculation "sort column" :

case [Sales (query)].[Order method].[Order method type] when 'Mail' then[Sales (query)].[Sales].[Quantity]*1 end

then sort the rows using this query calculation

And now suppress the display of the query calculation in the crosstab

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Report Studio","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.2.2;10.2.1;10.2;10.1.1;10.1;8.4.1;8.4;8.3","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21960728