August 7, 200322 yr I have 5 fields per record = unique code relating to [category] [category]= Text field with Value List attached (19 options) [cost]= Number field [price]= Number field [margin]= Calc field to display margin (%) between [cost] & [price] I want to create a CALCULATION field to add the [cost] results together, BUT only according to what [code] was selected. EG. if [code]=1 then [category]="labour" Then i want the CALC field to add the [cost] value from ONLY the record that [category]="labour". I can't seem to get an 'IF' CALC to work. Is a 'CHOOSE' or 'CASE' the way to go ? The total needs to ADD ALL records that have the same Category selection. Any help appreciated. Coza....
August 7, 200322 yr Simply define self relationship on code and then create a calculation field: CategoryTotal=Sum(SelfRel::cost) Dj
August 7, 200322 yr It sounds like Sum( code::cost ) is all you need, where 'code' is a self-relationship from the code field to itself. If the category for the record is 'labour', code = 1, for example, then this will give you the sum for all records in the file with the same category/code.
August 7, 200322 yr Author I still cant seem to get totals with the above mentioned. Attached is a example of what i have, Any help Please. Corey....
August 7, 200322 yr Author OOPs can't attach it. I can email it to any one who can help. [email protected] Thnx Corey....
Create an account or sign in to comment