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

return the element with the most occurence

Started by philelmousse, 05 Jan 2012 07:48:16 AM

Previous topic - Next topic

philelmousse

Hello,

I have a table of stats with a column "searchterm". I would like display the "searchterm" which is the most recorded.

I tried to use the count function or the topCount but without success

charon

hi,

would the function "rank" be a solution, maybe with an extra filter (rank<2) to render just one entry? Or did i missunderstand the problem you explained?
cheerz :p

philelmousse

my table has a column like that :

bla
blabla
bla
bla
outlook

I want something to retrieve "bla". So I have to use count distinct and something else i think


blom0344

[column]
count(distinct [column])  --> rankitem

define calculated item as  rank([rankitem]) --> ranker

drag this item into detail filter section:

ranker < 2 

set application of filter to 'After auto aggregation'

However, ties will still result in 2 or more rows returned