COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: hemantsoni on 22 Jan 2013 08:56:49 AM

Title: Urgent Help reqd..
Post by: hemantsoni on 22 Jan 2013 08:56:49 AM

Gurus,
I have a list report with the following columns:

Harvest,Samplename,Culture Day,harvest day etc.

values are like:

harvest samplename culture day harvest day
1             x                   29               TBD
1             x                   18               TBD
1             y                    59              TBD
2             z                    60              TBD
2             z                    55              TBD

I have to get the maximum culture day for each harvest.
I am using maximum(culture day for harvest)
Ideally it should give me :

harvest    cultureday

1                59
2                60

But instead of grouping by harvest report is returing 60 which is maximum value for the entire column.

Please suggest.
Title: Re: Urgent Help reqd..
Post by: custhe on 22 Jan 2013 11:15:36 AM
Your formula looks fine, but sounds like you may have one of your aggregation properties set to maximum for this data item.  I think it should be something like None/Calculated. 
Title: Re: Urgent Help reqd..
Post by: RKMI on 22 Jan 2013 11:23:22 AM
Hi,

Is your result set as following below ?

harvest samplename culture day harvest day
1             x                   60               TBD
1             x                   60               TBD
1             y                    60              TBD
2             z                    60              TBD
2             z                    60              TBD

If yes, you might want to show just distinct values for Harvest.

Thanks,
RK
Title: Re: Urgent Help reqd..
Post by: hemantsoni on 23 Jan 2013 01:14:47 AM

Hi,
I have changed the aggregate function and rollup aggregate function to none/calculated.
But it is not working.

Please help!!!
Title: Re: Urgent Help reqd..
Post by: blom0344 on 23 Jan 2013 02:17:56 AM
Should not be about the rollup setting. When you define maximum(culture day for [harvest]) then the aggregation setting can be set to calculated. Otherwise you are calculating aggregate over aggregate. In that case you would get the single highest value for the report..
Title: Re: Urgent Help reqd..
Post by: hemantsoni on 25 Jan 2013 03:50:51 AM


Thanks a lot for your replies.
But i have tried all the suggestions but it is not working.

Please suggest.
Title: Re: Urgent Help reqd..
Post by: blom0344 on 25 Jan 2013 04:07:14 AM
check the cognos SQL.

It should contain something like:


XMAX(sometable.culture day  for sometable.harvest )