Hello, I'd have a dataset where I'd like to create a new variable that gives me a count of a specific value for a set of variables across a row of data. For example, in this test dataset I want to create a new variable that that gives me a count of '0' values across variables a, b, c, and d. data test; input a b c d; cards; 1 0 9 1 1 1 0 0 0 9 1 1 0 0 9 1 1 0 9 9 0 1 1 0 1 9 9 1 1 9 0 0 0 0 9 1 9 1 0 0; run; The new variable (newvar) would return the following: newvar 1 2 1 2 1 2 0 2 2 2 Any help is appreciated. I can provide more information if that is helpful. Thanks, Matt
... View more