1
votes

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.

1
Are you using VB.net? - Anas Imran Tasadduq
I think you've already identified the best solution - how hard would it be to generate some classdata? - user667489
Also have the preloadfmt option available. - Reeza

1 Answers

0
votes

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.