Reputation: 11
I am trying to create a weekly table with Proc tabulate using a daterange prompt. The weekday is a class variable with other class
and var
variables. The problem I am facing is that if there is no data for a date then it is not displayed in the table and thus distorting my table.
I'm wondering if there is a way to include dates for which there is no data. I know about the classdata=dset
option but that requires values of all class variables and that is also not desirable.
Upvotes: 1
Views: 1024
Reputation: 9569
If each weekday comes up at least once with at least one combination of the other class variables, and you are able to produce the required output via proc summary
/ proc means
rather than proc tabulate
, you could use the COMPLETETYPES
option from those procs. Annoyingly, this option doesn't seem to be available in proc tabulate
.
Otherwise, I think you're stuck with generating a CLASSDATA
dataset. If you can't use proc means
/ proc summary
, but you do always have at least one record from each weekday as above, you could use a COMPLETETYPES
proc summary
to generate a CLASSDATA
dataset to use with proc tabulate
.
Another option possibly worth investigating would be to see whether you could add dummy records to your data, in such a way that they have no effect on the reported statistics.
Upvotes: 0