Hello @stefaninthailand
You have many options to use conditionals in the equations.
You can use the “IF” operation:
IF(fieldname1<fieldname2, fieldname2, fieldname1)
You can use the ternary javascript operator:
(fieldname1<fieldname2) ? fieldname2 : fieldname1
You can use the “if” conditional statement in javascript (javascript is a case-sensitive language, please, do not confuse it with the “IF” operation), and function structure:
(function(){
if(fieldname1<fieldname2) return fieldname2;
return fieldname1;
})()
However, in this specific case, you don’t need conditionals, only use the “MAX” operation:
MAX(fieldname1,fieldname2);
Note that fieldname1 and fieldname2 can be replaced by their respective formulas instead of using multiple calculated fields.
For example, if the equation in the fieldname1 is fieldname3+fieldname4, and the equation of fieldname2 is fieldname5+fieldname6 (these are hypothetical equations and fields’ names, selected only to describe the process), instead of using two calculated fields for fieldname1 and fieldname2, you can implement everything in a unique calculated field:
MAX(fieldname3+fieldname4, fieldname5+fieldname6)
Best regards.