Greetings, I am posting here because I am completely as a loss for how to accomplish the task I need to do under the scheme of SAS' programming structure. My problem (with an example table which is similar to my working table above) is the following: I have certain records with a recurring ID number, in this case 1-4 as seen above. Each record has a corresponding area. For each group of numbers 1-4, I would like to be able to divide the corresponding areas for ID's 1-3 by the areas for ID 4. I would like then to be able to either one of the following: a. (The more roundabout option) Create a new field where for every instance of of ID4 the corresponding Area is assigned in the new field for the id's, making division easier: ID AREA NEW_FIELD 1 101.2 789.1 2 324.5 789.1 3 23.6 789.1 4 789.1 1 234.9 23.6 2 492.8 23.6 3 153.9 23.6 4 23.6 b. the more direct and preferred option would be to bypass the previous step and just create a field outright with the computation I need. A modified version of what I have right now (which only addresses the step mentioned in part a) is: data Test2; set Work.Test; do i = 1 to 3; do j = 1 to 4; if ID = 4 then result = Area; end; end; run; I appreciate any insight that people may have to finding a solution to this problem. Unfortunately, as i mentioned, the SAS structure just isn't clicking. earl
... View more