AnsweredAssumed Answered

Conditional calculations

Question asked by AlexandrosKaralakis on Jul 17, 2014
Latest reply on Jul 17, 2014 by philmodjunk

Title

Conditional calculations

Post

     Hi,

     I am doing a research in economics. I have a table with many millions of records. The table goes like this:

     Fields: Animals, Plants, Letters, Numbers

     Records:

     tiger tomato A 1

     tiger tomato A 1

     lion banana B 2

     lion banana B 2

     1. I want to create another table that will conditional sum or average or whatever from my first table. E.g. sum all numbers if Animal is "tiger", plant is "tomato" and letter is "A". Is this done with calculation field or with a script?

     The second table will look like this: 

     Fields: Animals, Plants, Letters, Sum

     Records: 

     tiger tomato A 2

     lion banana B 4

     2. In order to populate some fields of my second table i am using a script that copies values from another table and creates records by pasting them. It works but it is slow because of the number of records. Is there any faster way than a script with functions like "loop", "go to Layout", "Go to Record", "copy", "Go to another layout", "paste", "end loop"

Outcomes