I don't think I asked my question correctly. This is what I need to do......some school districts run multiple referenda to get authority to raise taxes. Some district fail, then subsequently pass a referendum. Base on testing if this did occur, they then get additional other taxing authority. So I need to determine, for each entity that has both passed and failed a referendum in the past 3 years (so, the entity will have multiple records, one each for each attempted referendum), if the date of the "passed" referendum is more recent than that of the failed. My thought was to test each record and get a numeric result so I can then combine all the records into 1 record for the entity (which I will do with proc summary) to make comparisons within the entity record to see if there was a fail/pass situation, as opposed to trying to compare across multiple records. I have never worked with more than one record per entity, so this is causing me a bit of grief. My thought was to assign a "1" to each passed/failed response so then I can use the proc summary. For the entity 14 below, I should get a 3 in the failed field (after the proc summary) because they had 3 failed referenda. (My second problem is converting dates from an oracle database so SAS can compare and rank in chronological order.....) I don't have the loop code I used with me at home right now but it's not working anyhow.....I am getting (for entity 14, let's say) not only the counts for the entity 14 (which should be 3 failed), I was also getting counts for "passed" from the previous record in the summary record. (proc summary is by entity) I think they call this control break processing and I need to clear the fields with each new entity, but it's not working....I think the code is not too complex, but I don't have much experience. Thoughts on how to do this? entity vote date passed failed 7 10/25/2015 Y 7 1/18/2016 Y 7 10/18/2016 Y 14 2/16/2017 Y 14 8/26/2017 Y 14 9/15/2017 Y
... View more