I have a set of data in SAS EG and would like to count certain values in two different columns when a certain condition is met. I'm not sure how SAS EG wizards can assist with this or if it would require code to be entered to generate the table. For the output table I would like to count the "status" value in multiple columns (see Original data and Desired table below). I would like the data to be summarized as follows by program: If the status is ft24 OR ft30 I would like to count it in the table column I've titled ft24+ If the status is ft30 I would like for it to be counted in the column I've titled ft30+ If the status is pt12 OR pt15 I would like to count it in the table column I've titled pt12+ If the status is pt15 I would like for it to be counted in the column I've titled pt15+ Original data program,id,status,gender a,jk20020,ft24,m a,rm5050,ft24,f a,rn1010,ft30,m a,nr80080,ft30,f a,ab10010,pt12,m a,zu99000,pt12,f a,xx44100,pt12,f a,be55333,pt15,m a,qp22734,pt15,m b,uv19356,ft24,f b,pq34224,ft24,m b,qz11222,ft30,f b,ww44120,ft30,m b,qq99018,ft30,f b,rt33201,pt15,f b,ww99222,pt15,f b,zl5213,pt15,f Desired output in table format program ft24+ ft30+ pt12+ pt15+ a 4 2 5 2 b 5 3 3 3 Any insight and guidance is much appreciated by this SAS newbie!
... View more