Page 1 of 1

Empower Custom Fields - Max within a Result Set?

Posted: Thu Jun 08, 2023 9:12 pm
by Versiian
Hello all!

I'm not sure if I'm just blanking, but I've been trying to get this custom field to work without success. I have a molecule that has two criteria to meet:

1. Height/Area Ratio must be GTE 85% of the Maximum Height/Area Ratio
2. Peak Area must be GTE one third of the maximum peak area

Is there a way for me to write a custom field that can find the maximum within a result set? Or is this only available to do in an injection report?

Here's an example of a custom field I have prepared for the first criterion:

U%..MAX(Peak1[Height_Area_Ratio])*0.85

U is the label for all samples. Height_Area_Ratio is just Height/Area. Peak1 is a default peak name I'm using for this.

I've been trying to see if there is a way to avoid using Excel and just having Empower calculate the maximums of a result set.

Re: Empower Custom Fields - Max within a Result Set?

Posted: Fri Jun 09, 2023 3:18 pm
by DR
I'd look into using a filter instead of a CF for this. It can be a summary row or a separate table, but I'm pretty sure Maximum is a filtering option...

Re: Empower Custom Fields - Max within a Result Set?

Posted: Tue Jun 20, 2023 10:03 am
by EmpowersBane
3 CFs will do this. I just tested it on some example data in my lab and it worked fine. Copy formulas exactly as below, you are missing a period (.) in your post

Create a Result, Real, CF with search order Result Set Only and formula:

U%.%..MAX(Peak Name[Height_Area_Ratio])*0.85. This will calculate 85% of the maximum Height/Area ratio in all injections labelled with U...

Call this Result_CF1 (or whatever you prefer)

Then a second Result, Real, CF again search order Result Set Only, formula:

U%.%..MAX(Peak Name[Area])*0.3333 (this will calculate a third of the maximum peak area in all injections labelled with U...

Call this Result_CF2

Create a third Peak, Bool CF, search order Result Set First or Result Set Only, Use as Position, formula:

GTE(Peak Name[Height_Area_Ratio],Result_CF1)*GTE(Peak Name[Area],Result_CF2)

This will test each peak against the 2 conditions you want and return whatever text you put in position 1 of the translation table (Yes) and if both conditions aren't satisfied, this CF will return whatever text you entered for position 0 of the translation table (No)

Because of the search orders, you need to process a sample set to generate a result set for all the CF calculations to kick in they will be visible in the result set and a report method can be created to add in the CFs.