Hi everyone, would appreciate some help with generating a new variable/ editing my current ones. I am currently working with zip code level data and looking at the number of EV chargers.

Currently my column for EVChargers only shows the NEW number of chargers for each year, however I wish for the year to show the sum of all chargers from the previous years.
For instance, for zip code 90002, 2020 has 1 new charger. However, I want the total number of chargers as of 2022, so it should be 2 (since there was 1 in 2016)
Is there a code that would enable me to do this for all the zip codes and years?
Thanks
Currently my column for EVChargers only shows the NEW number of chargers for each year, however I wish for the year to show the sum of all chargers from the previous years.
For instance, for zip code 90002, 2020 has 1 new charger. However, I want the total number of chargers as of 2022, so it should be 2 (since there was 1 in 2016)
Is there a code that would enable me to do this for all the zip codes and years?
Thanks
Comment