According to the documentation, Sum() takes fieldnames (or literals) but you've put a calculation in there. How about creating a calculated field within the Registrations table and summing that? You may need one field per party...
On Friday, September 17, 2010, James McAlister <[email protected]> wrote: > I have three tables: Registrations (1.6 million voters), Votes (list of > each registration ID that voted on each day of early voting), and Days > (1 record for each of the 10 early vote days). > > The tables are joined like this: > > Registrations Votes Days > ID >---- ID > Party DayNum >---- DayNum > Total_R > > What I am wanting to do is configure a calculated field Total_R in > Days to return the total number of republican voters (marked with "R" in > the Party field of Registrations) that voted on each day of early > voting. When I get this working, I'll add other fields for other > parties. I'm doing it this way because I eventually need to use those > fields for a data series in charts. But maybe there's a better way. > > If I try to count the total number of votes on each day, this works: > Total_R = Count(REG_Registrations::ID). Since I get the right numbers, > I'm assuming context is OK. > > I'm trying to narrow this to total only those with "R" as party, but this > doesn't work: Total_R = Sum(If(REG_Registrations::Party="R";1;0)) > I just get a "?" mark in the field, but it is certainly wide enough to > display the data. > > What am I doing wrong? I hope this is clear. > > Using FMP11A. > > Thanks! > James > www.james-mc.com > Words To Live By > > -- Tim Mansour <[email protected]> Neologica Print & Promotions ABN 63 904 335 408 Certified FileMaker 10 Developer PO Box K1163 : Haymarket NSW 1240 Mobile 0405 500 846 : Melbourne in-dial 03 9012 7441
