Hello all,
I have two variables, one is called cp_flag (a string variable), that serves as a sort of dummy variable that can only take two values: "C" or "P". I also have another variable called ret, that is a numeric variable. I would like to find the sum of the numeric variable ret, but only when cp_flag is equal to "P". Those anyone know how to do this?
Thanks
I have two variables, one is called cp_flag (a string variable), that serves as a sort of dummy variable that can only take two values: "C" or "P". I also have another variable called ret, that is a numeric variable. I would like to find the sum of the numeric variable ret, but only when cp_flag is equal to "P". Those anyone know how to do this?
Thanks

Comment