Hello
I want to display values in millions.
The row data is displayed in thousands.
for example: value 1000 is 1 million, value 2000 is 2 million....
I want that the summary table of proc report will display values(sum ) in millions.
Data tbl;
input ID Team $ y;
cards;
1 a 1000
2 a 2000
3 a 3000
4 b 4000
5 b 5000
;
run;
proc report data=tbl nowd;
column Team y ;
define Team / group;
define y / analysis sum;
rbreak after / summarize;
run;
proc format;
picture million (round fuzz=0)
0 -high = '009.999.999' (prefix='' mult=1000);
run;
proc report data=tbl nowd;
column Team y ;
define Team / group;
define y / analysis sum;
format y million.;
rbreak after / summarize;
run;
Try using a picture format
Data tbl;
input ID Team $ y;
cards;
1 a 1000
2 a 2000
3 a 3000
4 b 4000
5 b 5000
;
run;
proc format;
picture million (round fuzz=0)
0 -high = '9.999.999' (prefix='' mult=1000);
run;
proc report data=tbl nowd;
column Team y ;
define Team / group;
define y / analysis sum;
format y million.;
rbreak after / summarize;
run;
Thank you very much.
I want to get different results.
For "a" will get value 6 (because it is 6 millions)
For "b" will get value 9 (because it is 9 millions)
For total will get value 15(because it is 15 millions)
However :
In your outcome I see 6.000.000 for "a"
In your outcome I see 9.000.000 for "b"
In your outcome I see 5.000.000 for 'total' (which is error anyway)
@Ronein wrote:
I want to get different results.
For "a" will get value 6 (because it is 6 millions)
For "b" will get value 9 (because it is 9 millions)
For total will get value 15(because it is 15 millions)
However :
In your outcome I see 6.000.000 for "a"
In your outcome I see 9.000.000 for "b"
In your outcome I see 5.000.000 for 'total' (which is error anyway)
Certainly, you could make the very simple change to the Picture format yourself and solve the problem.
proc format;
picture million (round fuzz=0)
0 -high = '009.999.999' (prefix='' mult=1000);
run;
proc report data=tbl nowd;
column Team y ;
define Team / group;
define y / analysis sum;
format y million.;
rbreak after / summarize;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: