Make sure the variable exists in your data set so that your BY statement is correct. You have a logical error so you need to modify your logic. Beyond that you need to show code.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.