BookmarkSubscribeRSS Feed
bryn
Calcite | Level 5

So I have merged together 2 data sets by the same last name. I now have several observation with the same last name. I want to combine all those variables(all with the same information in the other variables, just not in sales. I want to sum up all of the sales variables for each last name. 

 

Any idea of how to do this??

1 REPLY 1
ballardw
Super User

It would be helpful to see some example data and desired output.

 

It may be that something like

 

proc means data=yourdata sum;

    class lastname;

    var sales;

run;

 

does some of what you want.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 770 views
  • 0 likes
  • 2 in conversation