Dear all,
Greetings of the day
I have the quarterly data of a variable from june,2009 to march, 2018.
with those values, i have to compute the average value of the variable for the previous three years.
For example, at the end of march, 2012, i have to compute the average value of the variable from june,2009 to march,2012.
Next at the end of march, 2013, i have to compute the average value of the variable from june,2010 to march,2013. and so on till march, 2018.
the format of my dataset is as follows
| Company Name | var_june2009 | var_sept2009 | var_dec2009 | var_march2010 | ................ | var_march2018 |
| 20 Microns Ltd. | 2.05 | 2.05 | 0.46 | 0.29 | .............. | 0.29 |
| 3I Infotech Ltd. | 4.41 | 7.74 | 16.59 | 8.08 | ............... | 8.22 |
| 3M India Ltd. | 5.92 | 5.88 | 5.42 | 5.33 | ............... | 5.14 |
please help me writing the SAS code to perform the above mentioned calculation.
thanks in advance.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.