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

Passing multiple prompt values into calculated data item

Started by ccbarbeau, 01 Feb 2016 02:42:46 PM

Previous topic - Next topic

ccbarbeau

Good afternoon,

I have a requirement where my user needs to choose a few months and have me add up the numbers that are in the associated columns for a column in the output. I am working with relational data. my table looks like this:

                     Jan   Feb  Mar  Apr
Part                5       5     6      8

So the user chooses Months (ie Jan and Feb) and the calculated item would be 10.

I have tried #prompt, #promptmany... I cannot seem to get this working.

Any ideas?

Thanks!

BigChris

Assuming that's your table, rather than a crosstab built over your table, you're probably going to want something like:

January: if(?pMonth? contains 'Jan') then ([Jan]) else (0)
February: if(?pMonth? contains 'Feb') then ([Feb]) else (0)
etc.

You could also have some render variables that only show the columns that you select in your prompt. At the end of your report you'd then have a field for

Total: [January] + [February] + [March] etc.

ccbarbeau