rafs ome Posted February 12, 2004 Posted February 12, 2004 My database is a list of attendance. Field 1 is the key from the 'type of class' related database and field 2 is from a value list defining if they were 'booked' or 'attended' the class. I have to generate two fields with the result to use in a portal in a related 'student' database. I'm trying to get a count of the different contents of a field (field 2 in the example) only when this field is either "a" or "b" but this count is only to occour when another field (field one) is the same. i.e.(field 2&3 are the result) record 1 - field 1="a01" / field 2="a" / field 3="2" / field 4="1" record 2 - field 1="a01" / field 2="a" / field 3="2" / field 4="1" record 3 - field 1="a01" / field 2="b" / field 3="2" / field 4="1" record 4 - field 1="a02" / field 2="a" / field 3="1" / field 4="0" record 4 - field 1="a03" / field 2="b" / field 3="0" / field 4="1" I tried combining field1&2 in a calc and then did a gSum on this calc (with logic opps to exclude any result when field 2 is not "a" or "b". And I tried using self joins but I cant work it out simply.... However I have worked it out if I create a field in the 'Type of class" database that calculates on thier relationship the max(getSUM) and then in the original "attandance" database have a calc that dumps that field back into a new pair of fields. This is very messy and long winded -anyone else have a better idea?
Recommended Posts
This topic is 7660 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now