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.
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.