Hello
I have numeric values with format percent8.2
The negative values are displayed with ()
Example:
(11.60%)
1.41%
My question:
I want that negative values diaplay with minus and not ()
what is the way to do it?
Hi,
You could try something like the below. It uses the PERCENTNw.d format (notice the extra "N" in PERCENTNw.d).
data have;
format pc2 percentn8.2;
input pc1;
pc2 = pc1;
datalines;
-0.116
0.0141
;
Thanks & kind regards,
Amir.
Edit: Typo.
Hi,
You could try something like the below. It uses the PERCENTNw.d format (notice the extra "N" in PERCENTNw.d).
data have;
format pc2 percentn8.2;
input pc1;
pc2 = pc1;
datalines;
-0.116
0.0141
;
Thanks & kind regards,
Amir.
Edit: Typo.
Thanks.
so the difference is that I used percent8.2 and you used percentn8.2 ?
Hi Ronein,
Yes, that appears to be the case. You can see more from the documentation by using the link I provided in my previous post; thanks for marking it as a solution.
Thanks & kind regards,
Amir.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.