I have the following data set.
data have;
informat Week mmddyy8.;
input ID Group $ Week Disease $ Result $ ;
Format week date7.;
cards;
01 A 12/03/22 X Pos
02 A 12/03/22 Y Pos
03 B 12/17/22 Z Neg
04 A 12/17/22 X Pos
05 B 12/24/22 Y Pos
06 B 12/24/22 Z Neg
07 C 12/24/22 X Neg
08 A 12/31/22 Y Pos
09 A 01/14/23 Z Neg
10 B 01/14/23 X Pos
11 A 01/21/23 Y Pos
12 A 01/21/23 Z Neg
13 A 01/14/23 Z Neg
14 C 01/14/23 X Neg
15 A 01/21/23 Y Pos
16 C 01/21/23 Z Neg
17 A 01/14/23 Z Neg
18 C 01/14/23 Y Neg
19 B 01/21/23 Y Pos
20 C 01/21/23 Z Neg
;
I ran the code below to create a table.
PROC TABULATE data=have missing ;
CLASS Disease Result ;
TABLE Disease all="Total", Result * N='' ;
Where group = "C" ;
RUN;
I do not see the "Pos" column in the output table since there is no "Pos" in the "result" column where group="C". However, I would like to keep the "Pos" column in the output with zero value.