### Title

Help about Calculation if.....

### Post

Is it possible to set an If function in a calculation field?

Here is what I want to do:

I have the following fields: **Unit**, **Price in PCS**, and **Prices in PRS**

If **Unit **is PRS or KITS, then do the following calculation:** Prices in PRS = Prices in PCS x 2 **

If this is possible, can anyone show me how to do it?

Thank you!!!

If your "Prices in PRS" field is already defined as a calculation field, you can use the CASE function as follows:

Case ( PatternCount ( Unit ; "PRS" ) ; Prices in PCS * 2 ;

PatternCount ( Unit ; "KITS" ) ; Prices in PCS * 2 ;

"" )

This will look for either PRS or KITS in the Unit field and if true, return twice your Price in PCS field as a result.