COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: denise1p on 29 Mar 2010 12:50:19 PM

Title: How to count number of selections made in a multi-select prompt
Post by: denise1p on 29 Mar 2010 12:50:19 PM
On one of my reports, one of the filters is Date Range (yyyy-mm)
It's a multi select prompt.
On the list report I need to do a calculation as a set number times the number of months selected in the prompt.
I thought this was so simple.  I figured I could just do  nnn * count (?date_range?) 
Well, not so simple after all.  Instead what it's doing is counting the number of  hits in the database for that select.
Then I tried count distinct and that didn't work either. Is this even possible?
Title: Re: How to count number of selections made in a multi-select prompt
Post by: rlp on 29 Mar 2010 06:25:33 PM
You may want to try to count the number of commas in the prompt.  Possibly using a regex expression via a macro?