01-25-2018 10:43 AM
As a general note you might want to consider using numeric values of 1 and 0 instead of character 'Y' and 'N'.
If 1 is the value for 'Y' or 'Yes' or however you think then:
If varname then <other code> ; treats a value for the variable varname as true.
You can a have a number of different formats to assign a display value of 'Y', 'Yes' ,'True', 'In Compliance' or what have you.
For summary tables such as in proc report or proc tabulate then the N statistics gives how many results are assigned either value, Sum shows number of 'Y' values and mean is percentage of 'Y' values.
If you have multiple variables code this way then Sum of the variables gives a count of how many variables have 'Y' values.
And other coding behaviors are possible that get more cumbersome for character values.
Need further help from the community? Please ask a new question.