AnsweredAssumed Answered

Calculation problems

Question asked by Zinna on Jan 9, 2009
Latest reply on Jan 19, 2009 by ninja


Calculation problems





I'm new to findmaker and I hope someone can help me with this. I have the tables you can see above (and some more not concerning this question).


The first one, Prov (=Sample in english) contains information about different samples, like when and where they were taken. The second table, Prov_art, contains the species (Art) found in each sample and the number of individuals of each species(Antal) for each sample respectively. The third table contains a long list of species and information about them, like what family they belong to.


What I want to do is many things, but I'll start to ask about a few of them, so maybe I can figure out the rest by myself.

 How can I:

1. Count the number of individuals in one sample that belong to family A or B ?

2. Most families have a value that I can use to calculate an index. For each sample I want a sum of those values for all the families that have at least two individuals present in that sample. Example: 3 species in the sample belong to family A, two species to family B, and four species to family C. I want to sum the value for A,B and C. ValueA+ValueB+ValueC=sum. So it's independent of the number of species or individuals.

3. Count the number of families in one sample that have atleast two individuals present in that sample?


Oh, maybe I should add that I need these things for further calculations. I'm calculating an index for each sample and the numbers I get from the questions above are a part of that calculation. So just the final calculation needs to be saved in a field. For example in that calculation I need to divide the sum from q.2 with the result from q.3. 



If you don't understand what I mean, please ask. And thanks in advice for reading my long question and maybe answering it. :)