05-23-2016 11:39 AM
This is my code up to now:
proc freq data=123;
I want to know the total number of issr_id with the condition def=1.
But the Problem is, there are some issr_id with have more then one def=1.
How can I get the total number of issr_id with def=1, without issr_id with the same number are counted muliple times?
Hope you get my question.
05-23-2016 12:05 PM
It sounds like you're trying to get a frequency of unique issr_ids. Am I correct in assuming this? If so, before you do the proc freq, you could use PROC SQL and select distinct issr_ids, or a datastep and use by group processing to filter out issr_ids that are identical. Hope this helps.
05-23-2016 12:06 PM
It sounds like you are looking for just a single number as the output. If so, this might do it:
select count(distinct(issr_id)) from have where def=1;