COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognosehelp01 on 30 Jan 2015 11:14:00 AM

Title: get adjacent column value
Post by: cognosehelp01 on 30 Jan 2015 11:14:00 AM
Hey guys,

so I have a table with Date, value, count(value) and other identifying columns

I have another table where all I want is the Date and the value with the highest count
so-
Date | Value | Maximum(Value for Date)

The only thing is that when I reference the previous table, for "Value" I get all the values and not the one specific to the Max

so for a table with
1-1-14 | cat | 1
1-2-14 | dog | 3
1-2-14 |fish | 2
I get
1-1-14 | cat | 1
1-1-14 | dog | 1
1-1-14 | fish | 1
1-2-14 | cat | 3
1-2-14 |dog | 3
1-2-14 | fish | 3
when I want:
1-1-14 | cat | 1
1-2-14 | dog | 3
Title: Re: get adjacent column value
Post by: Robl on 30 Jan 2015 02:49:23 PM
You're getting the max for the grouped item.
You need to build a custom data item that finds the Max outside the grouping.

It would look a bit like
Max(date for Animal)

Then you'd need to change the roll up type to none or calculated.