Custom Field with 3 options
I need to create a custom field to display 3 different results:
1. If Amount is >=0.05, report Amount
2. If Amount is <0.05, report Below Quantitation Limit
3. If Amount is blank/empty, report Not Detected
Here is what I have already that is working but I dont know how to add the 3rd part.
Peak, Real:
GTE(Amount,0.05)*Amount + LT(Amount,0.05)*-60008
This custom field does not need to be numeric, it could be text because it would not be used for any further calculations.
1. If Amount is >=0.05, report Amount
2. If Amount is <0.05, report Below Quantitation Limit
3. If Amount is blank/empty, report Not Detected
Here is what I have already that is working but I dont know how to add the 3rd part.
Peak, Real:
GTE(Amount,0.05)*Amount + LT(Amount,0.05)*-60008
This custom field does not need to be numeric, it could be text because it would not be used for any further calculations.
0
Best Answer
-
It may be the order the formula is in. Empower takes each argument in turn, so if you put the arguments in order of lowest to highest, Empower will return the appropriate translation.
Change the formula to:
ENUM(EQ(REPLACE(Amount,0),0),LT(REPLACE(Amount,0),0.05)GTE(REPLACE(Amount,0),0.05)) then the translations become 0: Not Detected 1: Below Quantitation Limit 2: Amount (fc)
Im sure that will work as the peak will either be not detected ( ie 0), or below 0.05, or GTE 0.05. It must be one of those options. The Missing Peak box must be ticked and if you only want this custom field for named peaks, change Peak Type to Knowns.0
Answers
-
Peak Enum type Custom field. Search Order Result Set First, peak and sample type: All. Use as: Field. Make sure Missing Peak is ticked.
Formula is:
ENUM(GTE(REPLACE(Amount,0),0.05),LT(REPLACE(Amount,0),0.05),EQ(REPLACE(Amount,0),0)).
You get 3 options in the Translation table, 0,1 and 2. For 0 type in Amount (fc). For 1 Type in Below Quantitation Limit and for 2 Type in Not Detected. process a chromatogram and this will work.
0 -
Thank you for the info. First and second part works but the third part isn't. I am getting "Below Quantitation Limit" for any peak that is below 0.05 and also for named peaks that the Amount field is blank/empty/not found.0
-
EQ(Replace(Amount,0),0)* -60000 + GTE(Amount,0.05)*Amount + LT(Amount,0.05)*-60008. ALso select missing peak in custom field wizard
0 -
Without Enum also we can fulfill the requirement.0