Jump to content

This topic is 7849 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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....

Posted

Simply define self relationship on code and then create a calculation field:

CategoryTotal=Sum(SelfRel::cost)

Dj

Posted

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.

Posted

I still cant seem to get totals with the above mentioned.

Attached is a example of what i have, Any help Please.

Corey....

This topic is 7849 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.