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!
hi Paddie,
could you find the statistical ModE function in cognos. I could not find.. did you find a work around ??
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;
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