May 30, 200619 yr I need to find how many people voted in atleast 3 of the last 4 elections, but Im not sure about how to go about doing the Find in FM8. I have seperate fields for every election, and the data looks like this: VoterID---Gen05---Gen04---Gen03---Gen02 001134---G5------------G3--------G2 002459------G4---------G3-------- The field is empty (null) if they did not vote in that particular election. Any suggestions? I've reading the Help section a few times and can't seem to grasp how to find if they voted 3 times in any one of the 4 elections. Thank you... Edited May 30, 200619 yr by Guest
May 30, 200619 yr You could do a calculation field along the lines of (it would be a number result): If( Gen05 = ""; 0; 1) + If( Gen04 = ""; 0; 1) + If( Gen03 = ""; 0; 1) + If( Gen02 = ""; 0; 1) That would give you a number from 0 to 4, letting you know how many times they voted. I'm not sure if there's a cleaner calculation for it, but that should do it!
May 30, 200619 yr You could also use: not IsEmpty ( Gen04 ) + not IsEmpty ( Gen03 ) + not IsEmpty ( Gen02 ) But Jess, having each election as a field will increase your workload by 50 times! Every time you add an election, you will have to 1) add a field, 2) add that field on all your layouts throughout your solution, 3) modify every one of *these* types of calcs, 4) constantly create *these* types of calcs in an attempt to generate your summary figures and 5) you will never be able to generate reports. Each election should be a related record. Truly. I realize sometimes we can't change things already established but if not ... change it very soon! LaRetta :wink2:
May 30, 200619 yr Author MMS6F Thanks a million. That did the trick entirely as long as I do my find with the greater than or equal to operators. Laretta, I definitely see your point and wish I could change it, but this is how we are getting our data from the County Clerk. Thanks for your insight (as always)! Jess
May 30, 200619 yr not IsEmpty ( Gen04 ) + not IsEmpty ( Gen03 ) + not IsEmpty ( Gen02 ) Take a look next to the third dot in description dept. of this: http://www.filemaker.com/help/Functions%20Ref3.html Using "not IsEmpty" is bound to be slower due to number of functions involved! --sd
May 30, 200619 yr Thank you, Soren!! I prefer boolean tests. But I wasn't sure if those fields would always contain an integer or if they might contain only text or a G0 (as in year 2000). It *appeared* that they would contain Gx or nothing, but Sin of Assumption has biten me before ... Count() - of course! I was focused on getting to the issue of multiple fields.
Create an account or sign in to comment