### Title

how to make different calculations depending on the field value

### Post

I am newbie to Filemaker Pro and wonder how can I implement the following:

I need to make the calculations with different values in it depending on the value in a particular field.

For example:

If value of the field X <10 then the formula would be field 1*0.5+field2*0.6+field3*0.7

If value of the field X is equal or greater than 10 and less than 20 then formula field 1*1.5 + field2*1.6+field3*1.7

If value of the field X is equal or greater than 20 and less than 100 then formula would be field 1*2.5 + field2*3.6+field3*3.7

etc, etc

I have tried if and case functions, but obviously I am doing omething wrong.

Your help is very appreciated.

Hi

you can use the Case ( ) function which stops to evaluate at the first true condition.

Something like:

Case(

FieldX ≥ 20 and FieldX < 100 ; field 1*2.5 + field2*3.6+field3*3.7 ;

FieldX ≥ 10 ; field 1*1.5 + field2*1.6+field3*1.7 ;

field 1*0.5+field2*0.6+field3*0.7

)