Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have file that shows the number gifts given by each donor.
Here is a simple example:
DonorSummary:
Donor, GiftCount
'A', 1
'B', 2
'C', 3
'D', 0
and I would like to create a file showing who has given at least each number of gifts.
Donor A would have 1 record, because it's true that they have given at least 1 gift
Donor B would have 2 records, because it's true they have given at least 1 and true they have given at least 2.
Donor C would have 3 records.
Donor D would have no records.
The file would look like this:
Donor, AtLeast
'A', 1
'B', 1
'B', 2
'C', 1
'C', 2
'C', 2
Thanks
Something like this:
LOAD
Donor,
IterNo() as AtLeast
FROM
...source...
WHILE
IterNo <= GiftCount
;
Something like this:
LOAD
Donor,
IterNo() as AtLeast
FROM
...source...
WHILE
IterNo <= GiftCount
;
You could loop this with a while-statement like:
load Donor, iterno() as AtLeast
From XYT while iterno() <= GiftCount;
- Marcus
You see what I mean - I was too slow again
Ok, but there's nothing wrong with the quality of your answer
Thank you Gysbert and Marcus.
That works perfectly.
David