COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognosehelp01 on 16 Dec 2014 10:10:56 AM

Title: Transpose
Post by: cognosehelp01 on 16 Dec 2014 10:10:56 AM
Hey guys,

I'm looking to get group of list columns and use them as rows in a different list, is that possible? if so how?

A_|_B_|_C_|_D

As:

__________
A|________
B|________
C|________
D|________
Title: Re: Transpose
Post by: Zimbo_African_1980 on 16 Dec 2014 10:54:50 AM
Can you provide more infor, you may want to use repeater tables.
Title: Re: Transpose
Post by: CognosAnalytics on 16 Dec 2014 01:02:32 PM
Hello cognosehelp01,
Depending on the format of data in each column, you may union them all in one query, then use that single column in the projection list of the union result in the list column. You may want to have one more column with static data like 'A','B','C','D' or 1,2,3,4 in each query to act as the sort. Something like:
Select A, 1 as sort from table
union
Select B, 2 as sort from table
union
Select C, 3 as sort from table
union
Select D, 4 as sort from table

-Cognos810