COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: t1701 on 14 May 2013 06:05:29 PM

Title: List with dynamic column headings
Post by: t1701 on 14 May 2013 06:05:29 PM
I have a list report to create either from relational data or a cube in this format.

Customer     Product.     2013/05/14. 2013/05/07.  2013/05/01 .......
John.            Item A.        25.                  38.                52
Joe.              Item B.        87.                    0.                42

The list is by customer/product of quantities sold by week.
The week column headings are for the last 52 weeks.
I'm kind of stumped on the how to do the week columns.
Title: Re: List with dynamic column headings
Post by: Jiayue.lin on 14 May 2013 08:44:05 PM
Hi t1701,

I think it is better to define the week columns in tables, per your example, you need to add a new column for every new week
Title: Re: List with dynamic column headings
Post by: raj_aries on 15 May 2013 04:08:10 AM
I think it is better to go for crosstab with some formatting to make it look like a list.
Title: Re: List with dynamic column headings
Post by: terry_stjean on 15 May 2013 07:04:32 AM
Hi,
I can't define the weeks as columns in a table since they change from week to week as new data is added.
Right now, in the table, there is a column called Week_Ending with the week number.
In SQL, I can pivot it around but I can't use that in Framework Manager since it's not static, i.e. the weeks change.

How would I create a cross-tab but have it look like a List?
Title: Re: List with dynamic column headings
Post by: Lynn on 15 May 2013 11:44:24 AM
Quote from: tstjean on 15 May 2013 07:04:32 AM

How would I create a cross-tab but have it look like a List?

This post by PaulM is a great technique that might solve your problem.

http://www.cognoise.com/index.php/topic,11363.msg64116.html#msg64116