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

COUNT WHERE ?

Started by t0mato, 31 Mar 2021 09:13:45 AM

Previous topic - Next topic

t0mato

Hi,

In my database, we have applicants and a recruiting STEP they are in. Each candidate has an EMAIL_ADDRESS tied to them. How can I count the number of EMAIL_ADDRESS tied to a particular step?

My thoughts would be:

Count([EMAIL_ADDRESS] WHERE [STEP]='The step I want')

FOR doesn't seem to work in this instance either (in place of WHERE). Could someone help me with the syntax in this seemingly simple calculation?

MFGF

Quote from: t0mato on 31 Mar 2021 09:13:45 AM
Hi,

In my database, we have applicants and a recruiting STEP they are in. Each candidate has an EMAIL_ADDRESS tied to them. How can I count the number of EMAIL_ADDRESS tied to a particular step?

My thoughts would be:

Count([EMAIL_ADDRESS] WHERE [STEP]='The step I want')

FOR doesn't seem to work in this instance either (in place of WHERE). Could someone help me with the syntax in this seemingly simple calculation?

Hi,

If you wanted a count of addresses for each step, then the expression would be

count(distinct [EMAIL_ADDRESS] for [STEP])

Otherwise, if you wanted a count of email addresses for a particular step, then

if ([STEP] = 'The step I want')
then (count(distinct [EMAIL_ADDRESS] for [STEP]))
else (null)

Cheers!

MF.
Meep!

t0mato

Excellent, thank you!