COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: johangel on 22 Jun 2012 01:53:19 AM

Title: new variable for a count of data
Post by: johangel on 22 Jun 2012 01:53:19 AM
hi everybody,
I have in my report a number of samples.
now for every 20 samples I need a new variable,
for instance :40 samples==> I need 2 new variables
80 samples==>4 variables
42 samples==>3 variables
etc....
I need following layout:
20sampl 1
40sampl 1
              2
52sampl 1
               2
               3
How to do?
Thnx, johan
Title: Re: new variable for a count of data
Post by: blom0344 on 22 Jun 2012 01:15:46 PM
How bizar  :)

A report does not generate new rows normally, but I can think of an exotic solution using cross-joins. What generates the samples? Is there for example one database record containing '42 samples' or is the 42 a result of an aggregation.
More details on your source are in order I guess..
Title: Re: new variable for a count of data
Post by: johangel on 23 Jun 2012 05:56:06 AM
I explain:
I have a request_number,a method and sample_numbers;count(sample_numbers) give me total samples for the method.
The report:
section on method
in the list:
first column:requestnumber
second column :a calculated variable so that for every 20 samples I have a new row.
f.i. request_number 1 have 82 samples,so I need 5 rows next of the request_number
request_code 2 have 15 samples,so I want just 1 row next of the request_number
etc...
johan