Hello every one i have a table with only 1 record i want to count the number of times a particular value is there (counter) eg in table 1 we have 3 goals in table2 we have from goal1 to goal 3 ,similarly for current state
data have;
length var1-var7 $15.;
input var1$ var2$ var3$ var4$ var5$ var6$ var7$;
datalines;
client goal current_State goal current_State goal current_State
;
run;
What I am looking for


This code will calculate it using by-group processing, so you don't need to worry about keeping track of the unique words within each column. First, transpose it to a long format and sort it by word:
Now we can use by-group processing to add a numbered suffix to each word.
Now, we just need to resort it by
orderto get it back into the original order, then transpose it back to the desired format.