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

conditional total function

Started by Peewee71, 11 Feb 2009 11:20:37 AM

Previous topic - Next topic

Peewee71

I  have the following expression within report studio  which works fine.

total([ColA] for [TEAM] )

However, i now need to expand that expression to total values only where ColB is equal to the value 1.
I tried using:
total([ColA] for [TEAM] , [ColB]=1)
Unfortunately this does not work.  What do i need to change the expression to, so that it achieves this?

any ideas?

blom0344

CASE WHEN
([ColB]=1)
THEN
(total([ColA] for [TEAM] ))
ELSE
(0)
END