I have a table with four columns, and I am trying to make a new column based off of the available columns. Here is my script:
dtq = current data table();
a = dtq << New Column( "E",
Formula(
If(
Is Missing( :A ) & Is Missing( :B ), Abs( :C ),
Is Missing( :A ), Abs( :C / (:B - :D) ) ,
Is Missing( :B ), Abs( :C / (:D - :A) ),
//If !Is Missing( :A ) & !IsMissing( :B ),
//then do Abs( :C / (:B - :D) ) and Abs( :C / (:D - :A) ) and choose the gretaer value out of the two.
)
)
);
The first three conditions work, however the condition with values present in both A and B is something I am unable to work out. How can I make my script calculate 2 formulas and add the greater value out of these to my column in the table? Thank you for any help.