🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 02-08-2021 04:27 AM
(3289 views)
Good morning.
I would like to know if it is possible to display a percent format with a comma. Like this for example: 12,5% and not 12.5%
The percentw.d format always displays the period, not the comma.
Thank you
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @mariopellegrini,
You can also use the NLPCTw.d format:
options locale=IT_IT; /* This might be your default value. */
data _null_;
input p q;
put p nlpct6.1 q nlpct8.2;
cards;
0.125 -0.125
1 1.5678
;
Result:
12,5% -12,50% 100,0% 156,78%
6 REPLIES 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't think it exists out-the-box. Though, you can always roll out your own like this
proc format;
picture PercentC low-high = '000.009,9%' (multiplier = 1000);
run;
data _null_;
a = 0.125;
put a = PercentC.;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am interested in the format, not informat. I would visualize on the table 12,5% with comma
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
That's exactly what my code does?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@PeterClemmensen thank you. It's correct. How do I increase a decimal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @mariopellegrini,
You can also use the NLPCTw.d format:
options locale=IT_IT; /* This might be your default value. */
data _null_;
input p q;
put p nlpct6.1 q nlpct8.2;
cards;
0.125 -0.125
1 1.5678
;
Result:
12,5% -12,50% 100,0% 156,78%
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc format; picture PercentC low-high = '009,999%' (decsep=',' multiplier = 100000); run; data _null_; a = 0.125; put a = PercentC.; run;