BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

Hi Can anyone help me understanding in how PICTURE FORMAT works?

I have following code, but it's formatting 1 million and 10 millions as same and mistaking bigger numbers -

proc format;

picture mill

0-high = ' 000.9M' (prefix='EUR ' mult=.000001);

run;

data _temp_;

input x ;

datalines;

1000000

10000000

100000000

1000000000

;

run;

data y;

set _temp_;

y = put(x,mill.);

run;

 

Output:

1000000      EUR 1M
10000000    EUR 1.0M
100000000   EUR 10.0M
1000000000  EUR 100.0M

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

From the documentation of the multiplier= option:

picture million low-high='09.9M'
        (prefix='$' mult=.00001);

So your code should be

proc format;
picture mill
  0-high = ' 009.9M' (prefix='EUR ' mult=.00001)
;
run;

The documentation will also tell you why this needs to be so.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

From the documentation of the multiplier= option:

picture million low-high='09.9M'
        (prefix='$' mult=.00001);

So your code should be

proc format;
picture mill
  0-high = ' 009.9M' (prefix='EUR ' mult=.00001)
;
run;

The documentation will also tell you why this needs to be so.

thepushkarsingh
Quartz | Level 8
Many thanks