0

SAS Beginner here.

I have a table counting the number of patents an inventor makes across their career.

ID | Year | Patents
1    1990   1
1    1991   0
1    1992   2
1    1993   0
1    1994   1
2    1975   1
2    1976   0
...  ...   ...

I want to add a variable called "Past Inventions" that counts all the inventors Patents. So the resulting table would be...

ID | Year | Patents | Past_Inventions
1    1990   1         1
1    1991   0         1
1    1992   2         3
1    1993   0         3
1    1994   1         4
2    1975   1         1
2    1976   0         1
...  ...   ...       ...

How can I solve this using SAS?

frango_mints
  • 59
  • 1
  • 5
  • 1
    This is known as a running total, and is a duplicate of http://stackoverflow.com/q/32699227/1919583 – Reeza Jan 27 '16 at 05:43
  • 1
    Except I wouldn't use the answer marked correct. The other two answers are correct as well. – Reeza Jan 27 '16 at 05:45

0 Answers0