Could some one please let me know how I could insert parentheses as well as the $ sign for negative values using picture formats. I can do parentheses or the $ sign but dont know how to apply both. I am using them in Proc Report Any thoughts?
Thanks in advance!
Does this do what you want (look in log for output):
proc format library=work;
picture pay low-<0 ='000,009.99)' (prefix='($')
0 -high='000,009.99' (prefix='$');
run;
data _null_;
x= -1.25; put x pay.;
x= 1.25; put x pay.;
run;
Does this do what you want (look in log for output):
proc format library=work;
picture pay low-<0 ='000,009.99)' (prefix='($')
0 -high='000,009.99' (prefix='$');
run;
data _null_;
x= -1.25; put x pay.;
x= 1.25; put x pay.;
run;
You should add a space to the end of the picture for positive numbers so that the decimal place lines up with the negative numbers.
This is perfect! It worked.
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 the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.