09-22-2017 12:10 PM - edited 09-22-2017 12:20 PM
Hello dear experts,
I am facing a challenge today: need to find a sum of payments for groups of subjets ('Name' in the table below) that fall within assets ranges:
The ranges start from 100,000 and increment every 100,000 until 10,000,000. Whatever is greater than 10,000,000 is grouped together. So, there are 100 assets ranges:
10,000,000 and over
For example, payment for A and C will be summarized together. Same goes with B, E, and F. Also G and H.
I know it should be a loop with an incremental value to calculate sum of payments for each asset range but I can't figure it out. Need your help please!
09-22-2017 12:18 PM
I know it should be a loop with an incremental value to calculate sum of payments for each range but I can't figure it out. Need your help please!
I'm not sure what that means, but a SAS way of doing this easily is:
1. Create a format that contains your intervals.
2. Apply the format using a PUT statement to identify your groups.
3. Then sum using PROC MEANS.
Example for #1