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

i have created a  dataset of about 100 obs out of an external file and i used the proper format/informat  to read and write  the values of "account"

bank_name  account

BMO $1,000,000

TD     $2,000,000

RBC  $23,000,000

..........................

..............................

when i use rbreak after in my proc report  the total of "account" does not get formatted properly. I get something like $350000000.So what happened to the comma ?

Can i format the totals of each column after the rbreak?

Please advise

1 ACCEPTED SOLUTION

Accepted Solutions
Jagadishkatam
Amethyst | Level 16

Please try ,

data have;

    input name$ account dollar11.;

    format account dollar11.;

cards;

BMO $1,000,000

TD  $2,000,000

RBC $23,000,000

;

proc report data=have out=new headline headskip;

    column name account;

    define name /  width=20 ;

    define account/  width=30;

    rbreak after / summarize dol;

run;

Thanks,

Jagadish

Thanks,
Jag

View solution in original post

2 REPLIES 2
Jagadishkatam
Amethyst | Level 16

Please try ,

data have;

    input name$ account dollar11.;

    format account dollar11.;

cards;

BMO $1,000,000

TD  $2,000,000

RBC $23,000,000

;

proc report data=have out=new headline headskip;

    column name account;

    define name /  width=20 ;

    define account/  width=30;

    rbreak after / summarize dol;

run;

Thanks,

Jagadish

Thanks,
Jag
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

thanks Jagadishkatam

so i changed the format from dollar11. to dollar12. since the total of account was exceeding 11

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 369 views
  • 0 likes
  • 2 in conversation