# Rolling Bracket Recovery by Custom Field

Hi there,

I've been unable to figure this one out on my own and want to see if someone more savvy with custom fields can help me figure it out.   Is it possible in Empower 3 (FR3) to create a single custom field that can produce a rolling bracket recovery RSD?   Suppose you have an area count average of 5 system suitability injections and a total of three bracket injections.   Each bracket RSD is calculated as such:

Bracket 1 = RSD of 5 system suitability injections + Bracket 1
Bracket 2 = RSD of 5 system suitability injections + Bracket 1 + Bracket 2
Bracket 3 = RSD of 5 system suitability injections + Bracket 1 + Bracket 2 + Bracket 3
And so forth.

I've tried doing a sum of all possible brackets, but when processing at the end of the run it tabulates all injections for all brackets; I've not been able to find a way to restrict Bracket 1 to only Bracket 1 if later brackets exist, and in a way that will produce a rolling bracket recovery.    Is there a way to make this work, or am I asking too much of the custom field programming?

Hi again,

If that didn't work you may have to use the Summarize Incrementally function after each bracket and work around that. Other ways to do it may get very complex. I would suggest asking a Waters technical expert for help with this. Good luck!

• There are a few ways around this, not all require a custom field:

Create a Peak/Real/Calculated custom field for Sample type- Standards Only, Peak Type- All. Search Order- Result Set Only. Formula is S??.%..RSD(Area). Or if you only want to direct the formula to the active peak, throw the active peak into the "CCalRef1" field of the processing method used to process your sample sets, this way the formula becomes: S??.%..RSD(CCalRef1[Area]).

Label your First 5 system suit injections as, for example, S01, then your Bracket 1 injection as S02. Insert the function "Summarize Custom Field Incrementally" under the Bracket 1 Injection (Or above the Bracket 2 Injection, whatever way your sample set is constructed).

Next, Label your Bracket 2 Injection as S03 and again, insert "Summarize Custom Fields Incrementally" either directly below this injection or directly above the Bracket 3 Injections. Finally, presuming you only have 3 brackets to summarize, insert the final "Summarize Custom Fields Incrementally" as the last line in the sample set. When you process the run, you can report the results and filter the peak table by "Label" so that you can view the %RSD of Bracket 1 by only selecting Label S01 and S02, your next table is by S01 and S02 and your final table is by S01 and S02 and S03. For multiple brackets, filter by "Between" so for example Label Between S01 and S99.

If you don't need to report results, just review result set and throw the custom fields into the "Peaks" view. The relevant RSD results should be populated at each bracketing injection. This all presumes you run with one channel and process all your sample sets for result sets (no processing from Injections or Channels tab?). It also presumes you have no "Limits" set on any of your actives or custom fields in that project?

Alternatively, label all standards the same (eg as Standard) and the formula becomes SAME.%..RSD(CCalRef1[Area]), and follow the same steps as above.

Finally, just don't use any custom fields at all!. Label each relevant set of standards uniquely (for example Sys Suit and Bracket 1 as S0101 and S0102, Sys Suit + Bracket 1 + Bracket 2 as S0101, S0102 and S0103 etc etc. Then use the report method for your needs: Create an All Peaks Table, title it First Bracket and Sys Suit, report Area, Vial number, Peak name etc and filter the SampleType to Standard Only and Label to "Between S0101 and S0102, a second table Between S0101 and S0103 etc". Click the "Area" column and under column properties, add %RSD as a summary statistical function and set your desired level of precision.

Good luck!
• Empower2018,

Thanks for your response!   Let me clarify that this is strictly for the purposes of generating reports.   If I need to see a rolling RSD on brackets just to get the data I can selectively pull them into the report window, so that's not at issue.     And with the reports, I'm specifically looking for a single field that would show these values so it can most easily be added to a wide variety of analytical report templates we use through Empower 3.  We do indeed process exclusively as Result Sets and from a single channel (our multi-channel methods have multiple tables, and I'd expect to duplicate any RSD field per table).

Summarize Custom Fields Incrementally is new to me!  That looks like it could produce the result I'm looking for, but it would require the addition of the Summarize Custom Fields Incrementally lines to our existing templates; while doable, I was hoping to keep as much on the front end (that the user sees) as unchanged as possible, to avoid confusion or irregular results if the new line fails to get added.
--------------
While I was experimenting with getting custom fields to perform this calculation, I was having trouble finding out how to get multiple label types to process successfully.  For example, with a Custom field of Peak type and Real value:

std%.%.%.%RSD("Peak Name"[Area])
This equation would produce a result as expected.

When I tried to add a second label, for example label "bracket", I could not find a syntax or format that would produce the result.   An example of what I tried:

%RSD(std%.%.%.Area("Peak Name") +bracket%.%.%.Area("Peak Name"))

Do you know of a way to perform the %RSD function on injections/peaks with multiple specific labels?      The option of using ".%.%.%RSD()" is not ideal as we currently use multiple other label types, and the restricting the custom field  to "Standards Only" would only exclude some of the injections.

Thank you again for your help!

• edited March 2018
Hi. If you are looking to calculate the %RSD of, say Caffeine Peak across both 5 injections of system suit and a bracketing standard, then you need to keep the labels for these samples the same. If you start using a label syntax like % or S% or S?? etc then Empower is going to calculate the %RSD of your peak for every single standard with any label, a S% or S?? label, which isn't what you want. You want it to calculate for sequential sets of system suit/bracket standards?

I would approach this a few ways: by labelling the system suit injections and all of the bracketing standards the same eg "Std", then add in the Summarize Custom Fields Incrementally lines as above, it will require getting used to yes but its only a minor change to make. Why would making this calculate for Standards only be restrictive? I would have thought these injections were "Standards Only"?.

Another way is to create a Peak, Enumerated, Calculated custom field and call it something like "Rolling_RSD_Summary". Lets say you typically have 5 system suit injections and 10 bracketing standards. Label the system suit injections and bracketing stds as something that is easy to remember and to keep in the sample set templates eg System Suit injections a label of S01, bracketing std 1 and S02, S03 etc etc.

The formula is:

ENUM(EQI(Label, "S01")+EQI(Label,"S02"),EQI(Label,"S01")+EQI(Label,"S02")+EQI(Label,S03"),EQI(Label,"S01")+EQI(Label,"S02")+EQI(Label,"S03")+EQI(Label,"S04"),....etc right up to Std10). For the translation table, use as Position and insert as follows:
0 = S??.%..RSD(CCalRef1[Area])
1 = S??.%..RSD(CCalRef1[Area])

(same formula for each translation).

Warning! You still need to add Summarize Custom Fields as the last line of the sample set in order for the RSD to be calculated and this will add few minutes onto the processing time as the calculations kick in. Therefore it would help if you limited the cf to Standards Only that way you aren't wasting time and memory/table space populating the custom field for non-standard injections. Also, you need to ensure that these labels would work and not contradict any existing label structures for other custom fields. Good luck.
• Empower2018,

The inability to perform the %RSD calculation on different labels or on selective sequences of the same label seems to be the main stumbling block in getting a rolling bracket RSD to work.      The reason restricting the custom field to "Standards Only" would be restrictive is that several of our methods use additional standards, such as control standards or check standards, that are most appropriately labeled as standards rather than unknowns.

Thank you for the enumerated suggestion!  To try it out, Icreated a "peak, enumerated, calculated" custom field as you said, and set it up with the following formula:

ENUM(EQI(Label,"std1"),EQI(Label,"std1")+EQI(Label,"std2"),EQI(Label,"std1")+EQI(Label,"std2")+EQI(Label"std3"))

This gave three possible returns, in which I put the equation "std?.%..%RSD("Peak1"[Area])" for all three, keeping the formula the same.     As a "Position" type custom field, it would only return the equation rather than a value for all three, saying "std?.%..%RSD("Peak1"[Area])" instead of the expected value (0.0%, 0.18%, and 0.45% for the areas used).
When I changed it to be a "Field" type and added "(fc)" to the end of the equation, the custom field returned a value for all three, but it returned the RSD for all three standards each time (0.45%, 0.45%, and 0.45%). It seems it could not perform the function incrementally.    Is there something I was doing wrong with the "Position" type?

Ultimately, if there was a way to perform the %RSD function on specified values, I would be able to accomplish what I need to do by specifying each bracket recovery area as its own custom field; it would be time consuming, but functional.   Is there any way to apply the %RSD function within a custom field calculation for specified values?   Example: %RSD(Custom_field_1+Custom_field_2+Custom_field_3).
I have been unable to find any syntax that would produce a result or any examples of %RSD being used outside of the "label.injection.channel.function(field)" equation.

Thank you again for your help!

• Empower2018,

Thank you for your time and effort in answering my question, it is much appreciated.