11-09-2011 11:49 AM
I have created a selection in SAS Campaign Studio with alot of nodes. The selection was to select people who:
I know there is CASE statement which can be used, but not sure how to apply in SAS
Can anyone help?
Thanks in advance
11-09-2011 12:26 PM
Please see example below of the CASE statements:
sum(case when <<root.product>> in ('VD', 'VN', 'DM','PD','4PR','UN','ID','LT','N','IN') then 1 else 0 end)
What is the difference between having the 'sum' at the front or not having it at the front?
11-09-2011 12:35 PM
The SUM function will aggregate over the observations for given set of values of the grouping variables. Normally you would want that OUTSIDE the case statement. In this example the case statement will assign a number to each of the observations and then the SUM function will add them up.
There might be situations where you would put the sum function inside the case statement, but this example does not look like one.