proc tabulate data= vendor_grp; title 'Vendor Summary'; class Month_sort; var tot_cnt /*list numerica variables to be analyzed*/ cancelled _dec_eom_cnt inb_outb_aft_cnt ; Table Month_sort ='' all={label='Grand Total' S=[background = lightblue cellwidth=80]} *[STYLE=[Font_Weight=BOLD]], tot_cnt*(sum*f=comma15. ) /*compute the variables here*/ cancelled*(sum*f=comma15. pctsum<tot_cnt>) _dec_eom_cnt*(sum*f=comma15. pctsum<tot_cnt>) inb_outb_aft_cnt*(sum*f=comma15. pctsum<tot_cnt>); label Month_sort = 'FP Payment Date' label tot_cnt = 'Sent to NCCI for Doorknock(142)' label cancelled = 'Cancelled Next Day ', label ext_wait_def = 'Extended Waiting on Deferral', label _dec_eom_cnt = 'Decision By EOM', label inb_outb_aft_cnt = 'RPC IB/OB CONTACT AFTER DOOR KNOCK', label tot_cnt = 'Sent to NCCI for Doorknock(142)'; / Box='FP Payment Date'; run;
For some reason only label Month_sort = 'FP Payment Date' works properly (the word label is in blue). The remaining label entries do not turn blue. Also I want to include /Box to define the FP Payment Date. Why are the remaining label entries not turning blue as well as the "box" not turning blue??
The label statement has two basic forms:
single variable and label text, as in
Label variablename='some text';
or a single Label followed my multiple variable="text" pairs. They are not comma separated lists
Yours does not follow either of those and I expect that you log shows some interesting notes.
Instead of
label Month_sort = 'FP Payment Date' label tot_cnt = 'Sent to NCCI for Doorknock(142)' label cancelled = 'Cancelled Next Day ', label ext_wait_def = 'Extended Waiting on Deferral', label _dec_eom_cnt = 'Decision By EOM', label inb_outb_aft_cnt = 'RPC IB/OB CONTACT AFTER DOOR KNOCK', label tot_cnt = 'Sent to NCCI for Doorknock(142)';
Try
label Month_sort = 'FP Payment Date' tot_cnt = 'Sent to NCCI for Doorknock(142)' cancelled = 'Cancelled Next Day ' ext_wait_def = 'Extended Waiting on Deferral' _dec_eom_cnt = 'Decision By EOM' inb_outb_aft_cnt = 'RPC IB/OB CONTACT AFTER DOOR KNOCK' tot_cnt = 'Sent to NCCI for Doorknock(142)'
; / Box='FP Payment Date';
The editor was not showing the word "label" in blue because it was not in a valid position in the syntax so was not recognized as the key word label.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.