If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Help generating reports

Started by bepanda, 13 Nov 2012 06:57:13 AM

Previous topic - Next topic

bepanda

Hi there. I'm new to Cognos 8 and I really need help generating a report. Any help would be greatly appreciated.

I have the following table:
date               action     product
oct 1, 2012    started   product1
nov1, 2012    started   product1
nov1, 2012    started   product2
dec1, 2012     started   product1

I would like to create a report that looks like this:

report data         Oct      Nov     Dec
product1              1          1         1     
product2              0         1         0
product3             0          0         0

This seems to be pretty straight forward. But I don't seem to be able to generate it. Can someone give me the steps by steps help to do it?
I believe I can do this using a Crosstab?   I would like to have the number of month be always 13 months running.



Thanks.

blom0344

2 calculated dataitems additionally needed:


case when [action] = 'started' then 1 else 0 end



case
when extract(month,[date]) = 1 then 'Jan'
when extract(month,[date]) = 2 then 'Feb'
....
when extract(month,[date]) = 12 then 'Dec'
else null end


Build the crosstab making sure that you set an aggregate against the measure, otherwise the crosstab will remain empty

bepanda

Thanks for the help.
Yes , Indeed I get an empty crosstab. The months columns headers are display properly at the top of the table.
What do you mean to set an aggregate against the measure?
I tried a few things as the example below:

Code:[Select]
  count(if([action]='started') then 0 else 1)

Didn't make a difference. Still empty crosstab.

blom0344

Cognos crosstabs only work with measures if the regular aggregate setting (properties!) is set. Coding this in the definition is not good enough!!

Check out the setting in properties!!

bepanda

Yahoo!!! it is working.
Thanks for your help.