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

About Sum Function in expression definition

Started by priyanka, 24 Dec 2015 08:20:54 AM

Previous topic - Next topic

priyanka

could you please tell What does the sum function do in expression definition?

sum(If ([Products].[Sales].[STATUS] IN ('Success'))
THEN (1)
ELSE (0) )

MFGF

Quote from: priyanka on 24 Dec 2015 08:20:54 AM
could you please tell What does the sum function do in expression definition?

sum(If ([Products].[Sales].[STATUS] IN ('Success'))
THEN (1)
ELSE (0) )

Hi

If ([Products].[Sales].[STATUS] IN ('Success'))
THEN (1)
ELSE (0)


This returns a 1 or a 0 for each product sale. If you have 1000 sales you will have a mixture of 1000 1 and 0 values returned.

sum([the expression above])

will return the sum of these 1 and 0 values.

MF.

Meep!

cvamarley

Addition to that..

As far as I remember, we don't have the function named as 'SUM' in Report Studio. It should be 'TOTAL'.

Please correct me If i'm wrong.