BookmarkSubscribeRSS Feed
aperansi
Quartz | Level 8

 

I have the below data set that I am trying to condense. Right now I have multiple observations with the same Cost_Center, and I would like observations with the same cost_center combined, while maintaining all of the other variables in place.

 

Please let me know if I need to clarify anything to get help with this.

 

 

5 REPLIES 5
Reeza
Super User

I suspect you can do this via a summary task, just add all the variables you want to remain in the GROUP section and then the analysis vars for the ones you want to sum, average or summarize in some manner. 

 

If you need further help please post data in a text format, not as an image, and what you want as the output.

 

You also have not specified if you're coding or using the GUI.

 


@aperansi wrote:

 

I have the below data set that I am trying to condense. Right now I have multiple observations with the same Cost_Center, and I would like observations with the same cost_center combined, while maintaining all of the other variables in place.

 

Please let me know if I need to clarify anything to get help with this.

 

2019-02-21 10_26_12-ictsasappem - Remote Desktop Connection.png

 


 

aperansi
Quartz | Level 8
Reeza, can you tell me how to put my data in text format so that I can provide that to you?

Also, when you say I can do this via summary task, do you mean for me to use a Proc Summary statement?
Reeza
Super User

@aperansi wrote:
Reeza, can you tell me how to put my data in text format so that I can provide that to you?



https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

 

Post in a code box using the 6/7th icon. 

 


@aperansi wrote:



Also, when you say I can do this via summary task, do you mean for me to use a Proc Summary statement?

No, that's why I asked if you're programming or using the GUI. You didn't answer that question.

aperansi
Quartz | Level 8

I am coding this with SAS Enterprise Guide

andreas_lds
Jade | Level 19

Sorry, but it is still not clear what you mean by "condense".

 

How to post data is explained here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 861 views
  • 1 like
  • 3 in conversation