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 calculate Stastical 'Mode' in Cognos

Started by paddie, 08 Dec 2008 12:33:00 PM

Previous topic - Next topic

paddie

Hi,

I would like to know how to calculate Stastical 'Mode' in Cognos. There is no function avalialble as it is available for Mean and Median.

Mode is the most frequently occuring number in a data set.

Appreciate your help.

Thanks!

jwilliamstd

hi Paddie,

could you find the statistical ModE function in cognos. I could not find.. did you find a work around ??

VisioX

I would solve the problem on the DB side with something like that:

set rowcount 1;
select distinct colname
from  table subordinate
group by colname
having count(*) < (  select distinct count(*)
                     from table
                     group by subordinate.colname )
order by  count(*) desc;
set rowcount 0;

truebokonon

Though it's an old post I thought to reply since I struggled a lot to find a solution, here it it:

Create a query calculation or data item with the following:

maximum (if (running count (<expression> [for <expression>])=maximum(running count (<expression> [for expression]))) then (<expression>) else (null)))

first maximum is for taking out the null value from the result.

Hope it helps
Emanuele