BookmarkSubscribeRSS Feed
Pooja98
Fluorite | Level 6

Hi Experts,

 

i came across the situation, where I'm not able to solve this?

 

For example,

 

date           test        result          count of patient

04-11-20   Blood     Positive        20

05-11-20   Urine     Positive        56

04-11-20   Urine     Negative       2

06-11-20   Urine     Positive         7

05-11-20   Blood     Negative      5

06-09-20   Blood    Negative       52

 

My criteria is i need urine test only, to get the count of patient (both positive & negative)

like for urine test, total 65

 

please help me to resolve this situation. i have the data set of 20000 obs.

 

thanks in advance

1 REPLY 1
Reeza
Super User

This is the input data?

If so, assuming your data set name is HAVE and "count of patient" is PATIENT_COUNT. 

 

proc freq data=HAVE;
where test="Urine";
table result / out=summary_urine;
weight patient_count;
run;

@Pooja98 wrote:

Hi Experts,

 

i came across the situation, where I'm not able to solve this?

 

For example,

 

date           test        result          count of patient

04-11-20   Blood     Positive        20

05-11-20   Urine     Positive        56

04-11-20   Urine     Negative       2

06-11-20   Urine     Positive         7

05-11-20   Blood     Negative      5

06-09-20   Blood    Negative       52

 

My criteria is i need urine test only, to get the count of patient (both positive & negative)

like for urine test, total 65

 

please help me to resolve this situation. i have the data set of 20000 obs.

 

thanks in advance


 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 550 views
  • 0 likes
  • 2 in conversation