Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i need to count the variable NAME when the AGE is 18 or 19 and GENDER is M.
If there is only one condition ( for exemple AGE) i use: count({<AGE={'18','19'}>} NAME) and it works.
How can I introduce also the second condition (GENDER=M)?
Thank you
Marco, Check this helps you
count({<AGE={'18','19'},GENDER={'M'}>} NAME)
- Sridhar
Marco, Check this helps you
count({<AGE={'18','19'},GENDER={'M'}>} NAME)
- Sridhar
Thank you!!
It’s correct!
MArco
For a static test like that I would recommend you put the workload onto the script and use a flag, something like:
if ((AGE = 18 or AGE = 19) and GENDER = 'M', 1, 0) as YoungMaleFlag
then you can just use a simple expression in charts etc
sum(YoungMaleFlag)
Regards,
Gordon
Hi Sridhar,
i' ve to do another similar count if. This time i need to count all Name with gender M and age <=18.
I try to adapt your script like these:
count({<AGE<={'18'},GENDER={'M'}>} NAME).
It's not correct. Can you help me?
Thank you!
Marco
Hi Sridhar,
i' ve to do another similar count if. This time i need to count all Name with gender M and age <=18.
I try to adapt your script like these:
count({<AGE<={'18'},GENDER={'M'}>} NAME).
It's not correct. Can you help me?
Thank you!
Marco
Macro,
try this
count({<AGE={"<=18"},GENDER={'M'}>} NAME)
- Sridhar
It works!! Thank You a lot!
Marco
Hi,
i've to do another type of count if;
AGE <= of a numeric variable "VARIABLE" like the example:
count({<AGE={"<=VARIABLE"},GENDER={'M'}>} NAME).
But i 've problem...
Marco
Hi,
i've to do another type of count if;
AGE <= of a numeric variable "VARIABLE" like the example:
count({<AGE={"<=VARIABLE"},GENDER={'M'}>} NAME).
But i 've problem...
Can you help me again?
Marco