I have a dataset as below. I have the condition that if [(given<4) and (taken>=1)] then I have to sum up(collapse cells) for given and taken variables by grouping into company, area, division . company area division state given taken xxx MW MW_1 MP 3 7 xxx MW MW_1 UP 8 3 xxx E S_1 MN 5 4 xxx NE NE_1 AP 2 1 xxx NE NE_1 TN 1 1 xxx NE NE_2 TL 6 2 yyy MW MW_1 MP 3 4 yyy MW MW_1 OH 2 7 The result table should be as below for collapsed 1. I have no clue how to code this in SAS. company area division geography given taken xxx MW MW_1 MP_UP 11 10 xxx E S_1 MN 5 4 xxx NE NE_1 AP_TN 3 2 xxx NE NE_2 TL 6 2 yyy MW MW_1 MP_OH 5 11
... View more