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

How to find the first value in a column

Started by ambuj2k50, 15 Oct 2012 12:06:55 AM

Previous topic - Next topic

ambuj2k50

Hi Cognos Gurus,

Lets say the output of a column is

Column A
abc
def
cde

What is the expression to create a data item that will give only the output abc.

Thanks in advance.

blom0344

the concept 'first' is hazardous, cause database are not supposed to store data in an ordered fashion. By selecting data we imply a sorting through the query. 

Solutions either involve olap style functions like rownumber() or running aggregates like running-count.  You then need to apply the proper filter with 'after auto-aggregation' set to make sure you can filter . Thare are lots of posts dealing with this