|
I have a gift file organized like so (some of you may remember it):
ID GFTDAT GFTAMT 1 20051204 300.00 1 20060104 200.00 2 19990402 10.00 3 20071111 5.00 So, a record for each gift. Long format. Our current database will give me the date of the earliest gift and amount of largest gift right off the shelf. It *won't* give me, directly, the amount of the earliest gift or the date of the largest gift (date of the first occurrence of the largest gift if that amount was given on multiple dates). I have the information I need, I just don't have it as a single variable. Any thoughts would be very much appreciated. Mark ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Yes, two separate variables (date of biggest gift and amount of earliest
gift). Sorry for my lack of clarity, ViAnn. I just wasn't sure how to get at this via aggregate. I can get MIN and MAX for each variable that way, but I didn't know how to pull the date from the GFTDAT field once I identified the MAX gift, then get that into a new variable called, say, BIG_GFT_DAT. Seems like there's a step I'm missing after aggregate. Mark On Wed, Apr 9, 2008 at 9:56 PM, ViAnn Beadle <[hidden email]> wrote: > Do you want to store in a single variable both earliest date and maximum > gift?????? Or do you want to store them in two variables? > > If you want them as separate variables, then just aggregate on ID and > request MINIMUM of date for one variable and MAXIMUM of gift for other. > > But it really sounds to me like you want some combination of gift and date > in a single variable. Given the data you have here--what would the answer > be > for id 1? > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of > Mark Palmberg > Sent: Wednesday, April 09, 2008 8:05 PM > To: [hidden email] > Subject: earliest gift amt/date of largest gift > > I have a gift file organized like so (some of you may remember it): > > ID GFTDAT GFTAMT > 1 20051204 300.00 > 1 20060104 200.00 > 2 19990402 10.00 > 3 20071111 5.00 > > So, a record for each gift. Long format. Our current database will give > me > the date of the earliest gift and amount of largest gift right off the > shelf. It *won't* give me, directly, the amount of the earliest gift or > the > date of the largest gift (date of the first occurrence of the largest gift > if that amount was given on multiple dates). I have the information I > need, > I just don't have it as a single variable. Any thoughts would be very > much > appreciated. > > Mark > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
In reply to this post by Mark Palmberg
Mark,
You can get the date of the first gift by first sorting the file and then using aggregate. Like this, Sort cases by ID GFTDAT. Aggregate outfile=*/break=id/date=first(gftdat). I think this will work for the second problem. Sort cases by id (a) gftamt (d) gftdat (a). Aggregate outfile=*/break=id/date amount=first(gftdat gftamt). Gene Maguin ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
This:
Sort cases by id (a) gftamt (d) gftdat (a). Aggregate outfile=*/break=id/date amount=first(gftdat gftamt). worked perfectly, Gene, for getting date and amount of biggest gift. Thank you (and ViAnn for the AGGREGATE lead). I already had the earliest gift date as a variable from IT (the first syntax you provided above), but obviously a modification of the second bit here will get me the AMT of the earliest gift, which I don't have yet. This is great (and my IT contact will be glad to know she doesn't have to submit a request to get these variables added to our next software release). From soggy Iowa, Mark On Thu, Apr 10, 2008 at 8:26 AM, Gene Maguin <[hidden email]> wrote: > Mark, > > You can get the date of the first gift by first sorting the file and then > using aggregate. Like this, > > Sort cases by ID GFTDAT. > Aggregate outfile=*/break=id/date=first(gftdat). > > > I think this will work for the second problem. > > Sort cases by id (a) gftamt (d) gftdat (a). > Aggregate outfile=*/break=id/date amount=first(gftdat gftamt). > > Gene Maguin > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
In reply to this post by Mark Palmberg
So if you have max gift associated with every row for a particular client (and you haven't done what Gene recommends)
you could say... If (maxgift=gftamt) maxgiftdt=gftdt. Melissa -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Palmberg Sent: Wednesday, April 09, 2008 10:22 PM To: [hidden email] Subject: Re: [SPSSX-L] earliest gift amt/date of largest gift Yes, two separate variables (date of biggest gift and amount of earliest gift). Sorry for my lack of clarity, ViAnn. I just wasn't sure how to get at this via aggregate. I can get MIN and MAX for each variable that way, but I didn't know how to pull the date from the GFTDAT field once I identified the MAX gift, then get that into a new variable called, say, BIG_GFT_DAT. Seems like there's a step I'm missing after aggregate. Mark On Wed, Apr 9, 2008 at 9:56 PM, ViAnn Beadle <[hidden email]> wrote: > Do you want to store in a single variable both earliest date and > maximum gift?????? Or do you want to store them in two variables? > > If you want them as separate variables, then just aggregate on ID and > request MINIMUM of date for one variable and MAXIMUM of gift for other. > > But it really sounds to me like you want some combination of gift and > date in a single variable. Given the data you have here--what would > the answer be for id 1? > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf > Of Mark Palmberg > Sent: Wednesday, April 09, 2008 8:05 PM > To: [hidden email] > Subject: earliest gift amt/date of largest gift > > I have a gift file organized like so (some of you may remember it): > > ID GFTDAT GFTAMT > 1 20051204 300.00 > 1 20060104 200.00 > 2 19990402 10.00 > 3 20071111 5.00 > > So, a record for each gift. Long format. Our current database will > give me the date of the earliest gift and amount of largest gift right > off the shelf. It *won't* give me, directly, the amount of the > earliest gift or the date of the largest gift (date of the first > occurrence of the largest gift if that amount was given on multiple > dates). I have the information I need, I just don't have it as a > single variable. Any thoughts would be very much appreciated. > > Mark > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except > the command. To leave the list, send the command SIGNOFF SPSSX-L For a > list of commands to manage subscriptions, send the command INFO > REFCARD > > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Again, I apologize for a lack of full disclosure in my original request.
The maxgift variable is housed in a separate file (wide format, one record per ID). So I *do* have the maxgift field populated for each donor ID. A separate (long format) file contains more granular giving data. In your syntax, Melissa, how would it account for instances of an ID where maxgift=gftamt in multiple instances? Thanks for your reply! Mark On Thu, Apr 10, 2008 at 9:35 AM, Melissa Ives <[hidden email]> wrote: > So if you have max gift associated with every row for a particular client > (and you haven't done what Gene recommends) > you could say... > > If (maxgift=gftamt) maxgiftdt=gftdt. > > Melissa > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of > Mark Palmberg > Sent: Wednesday, April 09, 2008 10:22 PM > To: [hidden email] > Subject: Re: [SPSSX-L] earliest gift amt/date of largest gift > > Yes, two separate variables (date of biggest gift and amount of earliest > gift). Sorry for my lack of clarity, ViAnn. I just wasn't sure how to get > at this via aggregate. I can get MIN and MAX for each variable that way, > but I didn't know how to pull the date from the GFTDAT field once I > identified the MAX gift, then get that into a new variable called, say, > BIG_GFT_DAT. Seems like there's a step I'm missing after aggregate. > > Mark > > On Wed, Apr 9, 2008 at 9:56 PM, ViAnn Beadle <[hidden email]> wrote: > > > Do you want to store in a single variable both earliest date and > > maximum gift?????? Or do you want to store them in two variables? > > > > If you want them as separate variables, then just aggregate on ID and > > request MINIMUM of date for one variable and MAXIMUM of gift for other. > > > > But it really sounds to me like you want some combination of gift and > > date in a single variable. Given the data you have here--what would > > the answer be for id 1? > > > > -----Original Message----- > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf > > Of Mark Palmberg > > Sent: Wednesday, April 09, 2008 8:05 PM > > To: [hidden email] > > Subject: earliest gift amt/date of largest gift > > > > I have a gift file organized like so (some of you may remember it): > > > > ID GFTDAT GFTAMT > > 1 20051204 300.00 > > 1 20060104 200.00 > > 2 19990402 10.00 > > 3 20071111 5.00 > > > > So, a record for each gift. Long format. Our current database will > > give me the date of the earliest gift and amount of largest gift right > > off the shelf. It *won't* give me, directly, the amount of the > > earliest gift or the date of the largest gift (date of the first > > occurrence of the largest gift if that amount was given on multiple > > dates). I have the information I need, I just don't have it as a > > single variable. Any thoughts would be very much appreciated. > > > > Mark > > > > ===================== > > To manage your subscription to SPSSX-L, send a message to > > [hidden email] (not to SPSSX-L), with no body text except > > the command. To leave the list, send the command SIGNOFF SPSSX-L For a > > list of commands to manage subscriptions, send the command INFO > > REFCARD > > > > > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command SIGNOFF SPSSX-L For a list of > commands to manage subscriptions, send the command INFO REFCARD > > PRIVILEGED AND CONFIDENTIAL INFORMATION > This transmittal and any attachments may contain PRIVILEGED AND > CONFIDENTIAL information and is intended only for the use of the > addressee. If you are not the designated recipient, or an employee > or agent authorized to deliver such transmittals to the designated > recipient, you are hereby notified that any dissemination, > copying or publication of this transmittal is strictly prohibited. If > you have received this transmittal in error, please notify us > immediately by replying to the sender and delete this copy from your > system. You may also call us at (309) 827-6026 for assistance. > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
On Thu, Apr 10, 2008 at 10:10 AM, Melissa Ives <[hidden email]> wrote:
> Are you saying that you have two files like this: ?? > Yup. > > > Do you want the first or last date for the maximum gift? > First. > > Then you could calculate MAXDT If (INFILE2=1) maxgftdt=GFTDAT. > That is cool, Melissa. Thank you! > > HTH > Melissa > ------------------------------ > *From:* Mark Palmberg [mailto:[hidden email]] > *Sent:* Thursday, April 10, 2008 9:53 AM > *To:* Melissa Ives > *Cc:* [hidden email] > *Subject:* Re: earliest gift amt/date of largest gift > > Again, I apologize for a lack of full disclosure in my original request. > The maxgift variable is housed in a separate file (wide format, one record > per ID). So I *do* have the maxgift field populated for each donor ID. A > separate (long format) file contains more granular giving data. > > In your syntax, Melissa, how would it account for instances of an ID where > maxgift=gftamt in multiple instances? > > Thanks for your reply! > > Mark > > On Thu, Apr 10, 2008 at 9:35 AM, Melissa Ives <[hidden email]> wrote: > > > So if you have max gift associated with every row for a particular > > client (and you haven't done what Gene recommends) > > you could say... > > > > If (maxgift=gftamt) maxgiftdt=gftdt. > > > > Melissa > > > > -----Original Message----- > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of > > Mark Palmberg > > Sent: Wednesday, April 09, 2008 10:22 PM > > To: [hidden email] > > Subject: Re: [SPSSX-L] earliest gift amt/date of largest gift > > > > Yes, two separate variables (date of biggest gift and amount of earliest > > gift). Sorry for my lack of clarity, ViAnn. I just wasn't sure how to get > > at this via aggregate. I can get MIN and MAX for each variable that way, > > but I didn't know how to pull the date from the GFTDAT field once I > > identified the MAX gift, then get that into a new variable called, say, > > BIG_GFT_DAT. Seems like there's a step I'm missing after aggregate. > > > > Mark > > > > On Wed, Apr 9, 2008 at 9:56 PM, ViAnn Beadle <[hidden email]> wrote: > > > > > Do you want to store in a single variable both earliest date and > > > maximum gift?????? Or do you want to store them in two variables? > > > > > > If you want them as separate variables, then just aggregate on ID and > > > request MINIMUM of date for one variable and MAXIMUM of gift for > > other. > > > > > > But it really sounds to me like you want some combination of gift and > > > date in a single variable. Given the data you have here--what would > > > the answer be for id 1? > > > > > > -----Original Message----- > > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf > > > Of Mark Palmberg > > > Sent: Wednesday, April 09, 2008 8:05 PM > > > To: [hidden email] > > > Subject: earliest gift amt/date of largest gift > > > > > > I have a gift file organized like so (some of you may remember it): > > > > > > ID GFTDAT GFTAMT > > > 1 20051204 300.00 > > > 1 20060104 200.00 > > > 2 19990402 10.00 > > > 3 20071111 5.00 > > > > > > So, a record for each gift. Long format. Our current database will > > > give me the date of the earliest gift and amount of largest gift right > > > off the shelf. It *won't* give me, directly, the amount of the > > > earliest gift or the date of the largest gift (date of the first > > > occurrence of the largest gift if that amount was given on multiple > > > dates). I have the information I need, I just don't have it as a > > > single variable. Any thoughts would be very much appreciated. > > > > > > Mark > > > > > > ===================== > > > To manage your subscription to SPSSX-L, send a message to > > > [hidden email] (not to SPSSX-L), with no body text except > > > the command. To leave the list, send the command SIGNOFF SPSSX-L For a > > > list of commands to manage subscriptions, send the command INFO > > > REFCARD > > > > > > > > > > ===================== > > To manage your subscription to SPSSX-L, send a message to > > [hidden email] (not to SPSSX-L), with no body text except the > > command. To leave the list, send the command SIGNOFF SPSSX-L For a list of > > commands to manage subscriptions, send the command INFO REFCARD > > > > PRIVILEGED AND CONFIDENTIAL INFORMATION > > This transmittal and any attachments may contain PRIVILEGED AND > > CONFIDENTIAL information and is intended only for the use of the > > addressee. If you are not the designated recipient, or an employee > > or agent authorized to deliver such transmittals to the designated > > recipient, you are hereby notified that any dissemination, > > copying or publication of this transmittal is strictly prohibited. If > > you have received this transmittal in error, please notify us > > immediately by replying to the sender and delete this copy from your > > system. You may also call us at (309) 827-6026 for assistance. > > > > ===================== > > To manage your subscription to SPSSX-L, send a message to > > [hidden email] (not to SPSSX-L), with no body text except the > > command. To leave the list, send the command > > SIGNOFF SPSSX-L > > For a list of commands to manage subscriptions, send the command > > INFO REFCARD > > > > > ------------------------------ > PRIVILEGED AND CONFIDENTIAL INFORMATION > This transmittal and any attachments may contain PRIVILEGED AND > CONFIDENTIAL information and is intended only for the use of the > addressee. If you are not the designated recipient, or an employee > or agent authorized to deliver such transmittals to the designated > recipient, you are hereby notified that any dissemination, > copying or publication of this transmittal is strictly prohibited. If > you have received this transmittal in error, please notify us > immediately by replying to the sender and delete this copy from your > system. You may also call us at (309) 827-6026 for assistance. > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
| Free forum by Nabble | Edit this page |
