Hi everyone, I'm kind of stuck on a problem with proc tabulate and it would be great if someone could help me out. I've read in various papers as well as in the official Base SAS Procedures guide that it is possible to create subtotals in proc tab by using user-defined multilabel formats with the options mlf, preloadfmt, and order=data. I believe I have set up the format and the proc tab in the correct way, but I get the following error: "WARNING: MLF conflicts with PRELOADFMT in class variable bucketab. It is ignored" And thus the subtotal rows are not displayed. Here's my code: proc format;
value bucketfmt (NOTSORTED MULTILABEL)
0 = " 0 to 5"
1 = " 6 to 30"
0-1 = "0 to 30"
2 = " 31 to 60"
3 = " 61 to 90"
4 = " 91 to 120"
5 = " 121+"
2-5 = "31+"
;
run; proc tabulate data = de_term_6 NOSEPS;
class bucketab / mlf preloadfmt order=data MISSING;
class product stage;
var total_osb;
table bucketab ALL,
product*stage*(N*F=comma8. total_osb*F=NLMNLEUR20.2 PCTN*F=pctfmt8.2 PCTSUM*total_osb=""*F=pctfmt8.2)
ALL*(N*F=comma8. total_osb*F=NLMNLEUR20.2 PCTN*F=pctfmt8.2 PCTSUM*total_osb=""*F=pctfmt8.2)
/ BOX = "----------";
label bucketab = "" total_osb = "€";
keylabel N = "#" SUM = "" PCTN = "%#" PCTSUM = "%€" ALL = "Total";
format bucketab bucketfmt.;
where contract_status = "Active" & stage != "SALVAGE" & total_osb > 0;
title "---------------";
title2 "July 2017";
run; I've tried using printmiss as an option on the table statement, that resulted in the 30+ row being printed, but without any values. I don't believe this options should be necessary in any case. Any help is much appreciated.
... View more