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

Counter in Group Batch

Started by sunny bachan prasad, 16 Jul 2015 12:54:32 PM

Previous topic - Next topic

sunny bachan prasad

Hi Cognos Guru,
I am using relational model and database is oracle.
I have used group by in my report on ID.Now i have to count number of record in each batch of ID.And count should start from 1 every time new id will come as shown below.For example if we have  3 row for ID=1 then we have count value as 1,2,3 in each row respectively and if ID=2 has 2 record then we have 1,2 in row respectively and so on.

ID    count
1        1
1        2
1        3
2        1
2        2

Thanks in advance.

MFGF

Quote from: sunny bachan prasad on 16 Jul 2015 12:54:32 PM
Hi Cognos Guru,
I am using relational model and database is oracle.
I have used group by in my report on ID.Now i have to count number of record in each batch of ID.And count should start from 1 every time new id will come as shown below.For example if we have  3 row for ID=1 then we have count value as 1,2,3 in each row respectively and if ID=2 has 2 record then we have 1,2 in row respectively and so on.

ID    count
1        1
1        2
1        3
2        1
2        2

Thanks in advance.

I'm assuming you have another column that has different values within each ID group? If so, just use a running-count() summary on this in a query calculation, eg

running-count([your other column] for [ID])

I have attached an example...

MF.
Meep!