@srikanthyadav44 wrote:
Dear all
Greetings of the day
i have to perform a arithmetical calculation repeated on the same dataset with the repeated variables from the year 2010 to 2018.
my data set is as follows
Var1_2010 |
var2_2010 |
var3_2010 |
Var1_2011 |
var2_2011 |
var3_2011 |
…………. |
Var1_2018 |
var2_2018 |
var3_2018 |
21.21 |
-1.4 |
-19.8 |
1.5 |
5.7 |
32.1 |
|
59.8 |
21.16 |
-8.9 |
5892.48 |
1807 |
245.7 |
824.6 |
158 |
7712.8 |
|
7617.3 |
5786.81 |
2025.8 |
107.71 |
-4.6 |
-18.5 |
1.2 |
|
-1.6 |
|
22.6 |
4.9 |
-5.9 |
206.18 |
35.6 |
1.5 |
79.9 |
19.5 |
1082 |
|
651.6 |
235.06 |
51.4 |
1080.4 |
-422.2 |
113.9 |
158.7 |
28.6 |
845.4 |
|
1885.2 |
1103.55 |
-755.9 |
Adding to the other replies ... this data structure is not a good one for most types of analyses, if you have created this data structure, the next time you might want to make it look like this:
Row VAR YEAR Value
1 var1 2010 21.21
1 var2 2010 -1.4
1 var3 2010 -19.8
2 var1 2010 5892.48
etc.
and the whole analysis of computing sums is extremely simple in PROC SUMMARY.
I realize that many times our data comes from Excel, and there it is organized as you showed in your original post, but if you are creating this data yourself, don't do it as in the original post, do it as I showed in this post.
--
Paige Miller