May 24, 200421 yr I have a question about some (for me) difficult calculation. I have a table with Events. Every Event can have several participants (own table). The event has a limit of how many participants it can have. Every participant has a status, which can be "allowed" or "not allowed" (which is choosen from a valuelist). My question is, how can I count how many of the participants that have the status = "allowed"? regards /P
May 24, 200421 yr There are several ways to do this, but the best way depends on where you need to use it. Is it just for a report? Is it needed in the context of the Participant table or the Event table?
May 24, 200421 yr Author I need it in the Event table to be able to calculate if there is any places left (so that the limit for the event isn't yet reached)
May 24, 200421 yr I don't quite get the Allowed/Not Allowed terminology, but this is how you would add a count of "Allowed" in Event: In Event, define fields: gAllowed (global, text) enter "Allowed" into field Count_Allowed (calculation, number) = Count(Participant by Allowed::Participant ID) Add a table occurance of Participant, called Participant by Allowed: Event::Event ID = Participant::Event ID and Event::gAllowed = Participant::Status
Create an account or sign in to comment