BookmarkSubscribeRSS Feed
thanikondharish
Fluorite | Level 6

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
Fluorite | Level 6
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

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