BookmarkSubscribeRSS Feed
thanikondharish
Calcite | Level 5

id

sale

101

5

101

14

101

.

102

45

102

78

102

58

102

69

102

89

102

.

 

assign sum id wise into missing values like see below

 

id

new

101

5

101

14

101

19

102

45

102

58

102

69

102

78

102

89

102

339

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Post test data in the form of a datastep, we have asked you this time and time again.

As such no code, retain a variable, add value to this each row, if row is . then set to retained value and then set retained value back to zero.

thanikondharish
Calcite | Level 5
how to assign mean value in missing places
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Retain sum of values and count of items, mean is sum/count

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!

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
  • 3 replies
  • 841 views
  • 0 likes
  • 2 in conversation