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

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;
1 ACCEPTED SOLUTION

Accepted Solutions
rudfaden
Lapis Lazuli | Level 10

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;

View solution in original post

4 REPLIES 4
rudfaden
Lapis Lazuli | Level 10

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;
Ronein
Onyx | Level 15

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)

 

 

 

PaigeMiller
Diamond | Level 26

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

--
Paige Miller
rudfaden
Lapis Lazuli | Level 10

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;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2653 views
  • 1 like
  • 3 in conversation