Quantcast
Channel: WordPress.org Forums » [Cost Calculator Builder] Support
Viewing all articles
Browse latest Browse all 98

Sum of two fields formula with conditional formulas

$
0
0

Replies: 0

Can a formula field be created that contains the sum of two formula fields with conditional formulas and the result of the calculation is correct? The test I did gives the wrong result… and I wonder if it is wrong because it can’t be done.

For example: an item has a price of 5,00 €.

If you buy 1 to 5 items the value is 5,00 € but if you buy more than 5 items the value is 5-((5*15)/100), that is, 4,25 €, with a 15% discount.

Can you add formulas that contain formulas?

That is, formula A contains a complex conditional formula and formula B another complex conditional formula like the ones mentioned above. And I create a formula C that adds formula A and formula B that contain those complex conditional formulas.

Formula A

(quantity_field_id_1 – quantity_field_id_2) + (quantity_field_id_3 *30.050605) + (quantity_field_id_4 *30.050605)

Formula B

IF (quantity_field_id_5 > 4) {
(((quantity_field_id_5 – 4) * 2) – quantity_field_id_6) * 3.005061
} ELSE {
0
}

FORMULA C

Formula A + Formula B

Thank you


Viewing all articles
Browse latest Browse all 98

Trending Articles