Date: Mon, 12 Jan 2009 17:43:29 -0500
Reply-To: Pareen Patel <mditconsult@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Pareen Patel <mditconsult@GMAIL.COM>
Subject: How could i write a code so that my process stops when it reaches
80% of total spend
I have 10 members who are spending different amount at different locations.
But i only want to check those top members who makes 80% of total spend.
for e.g.
Member Spend
1 50
2 175
3 25
4 400
5 10
4 125
3 100
2 25
1 35
5 5
If i use proc sort, i can see my top four members make 80% of total spend.
What should i do if i have to do this for more then million observations.
4 400
2 175
4 125
3 100
1 50
1 35
3 25
2 25
5 10
5 5
So that i can get
4 400
2 175
4 125
3 100
-------------
4 800
total total spend
members