Advertisement

Help Creating a Custom Field for % Difference Between Sample

Discussions about chromatography data systems, LIMS, controllers, computer issues and related topics.

13 posts Page 1 of 1
Hello everyone,

I'm currently working on Empower (Waters), and I'm trying to create a Custom Field that calculates the percentage difference between two samples within a pair, based on the Amount field.

Here is how my samples are structured:
U0101 and U0102
U0201 and U0202
U0301 and U0302
... and so on.
I've done some testing, but I can't get it to work. I'm not sure how to configure Empower to apply the %Diff calculation to each pair of samples (e.g., U0101 and U0102), then continue with the next pair, and so forth.

Can anybody please help me ? Thank you very much
First off, welcome to the forum. It's nice to see a new user posting without including a mention of BAN ME! (we've had some spamming issues lately).

As to your question -
If your paired samples are separate preps of the same thing, each with its own weight or other needed numbers that are not the same for both, you're on the right track. If you're just comparing results based on multiple injections of the same prep, you're probably doing it the hard way and may not be in need of a CF at all.
Please provide a little more detail and someone with more up to date knowledge and/or experience will likely help you.
Also, check out https://support.waters.com/KB_Inf/Empow ... f_the_Week
tips 82, 88 and/or 94 may help. Website is free if you register with an email.
Thanks,
DR
Image
I would give each pair of samples the same label so U0101 and U0101, then U0201 and U0201 etc.
Then create a peak, real, calculated custom field. Search order Result set only, formula:
(ABS(SAME.%..MAX(Amount)-SAME.%..MIN(Amount)/SAME.%..AVE(Amount))*100)

This presumes you are calculating % difference by dividing the difference between the 2 numbers by the average of the 2 numbers and multiply by 100.The ABS is for Absolute values in case the difference is a minus number.
If you calculate it a different way then change to formula to match the way you do it.
Add Summarize Custom Fields as the last line of the sample set, process a sample set to generate a result set and the answers for each pairing will be in the result set.
Hello,

Thank you for the warm welcome. I just saw the BAN ME posts – how awful.

To answer your questions:

We have two preparations for the same lots that we need to inject separately (different vials, so different injections).

The CF you proposed matches what I need to do, but unfortunately, we must have different labels, as required by our SOP.

I'm not sure if it's possible to create a CF by asking Empower to calculate based on injections that have the same first three letters of the label?

Thanks you
I think if you modify your labels so that each pair uses the initial same 2 numbers, and the CF calls them by that, you'll be OK.
SAME...--> U010?... U020?...
and you will need a new CF for each pair of samples :(

It's counterintuitive, but I don't think there's any reason (aside from your SOP) that you cannot use the same label for replicates of the same sample, even if their weights differ - would make this so much easier if you can do so...
Thanks,
DR
Image
Yes, it is possible to do that, my previous company has the same policy before. Instead of using the label reference directly . we input the same sample with the same lot#. see below for detail

U0101 & U0102 are from Lot# A0001.
Difference% from U0101 from Average of U0101 and U0102 can be calculated. and Diff% is double of difference%

U0201 & U0202 are from Lot# A0002
U0301 & U0302 are from Lot# A0003

and when the lot# is the same. calculate the average of the assay% for the same lot# and individual amount will have same difference% with average and double the difference% as diff% you need, where you can get the diff% for the pair samples.

George
Hello everyone,

I'm currently working on Empower (Waters), and I'm trying to create a Custom Field that calculates the percentage difference between two samples within a pair, based on the Amount field.

Here is how my samples are structured:
U0101 and U0102
U0201 and U0202
U0301 and U0302
... and so on.
I've done some testing, but I can't get it to work. I'm not sure how to configure Empower to apply the %Diff calculation to each pair of samples (e.g., U0101 and U0102), then continue with the next pair, and so forth.

Can anybody please help me ? Thank you very much
You could always create a peak, enumerated custom field with the second label of each pair pointing back to the calculation between that pair but would probably only be helpful for running a max of 10 pairs of samples. If running more that that let me know I think i know a solution.
I think georgelin is onto something - this would be done in your report tables by filtering by lot mark or other similar tag and then adding summary fields to generate a new table w/ stats for each pair of sample preps.
A lot of people want to get into CFs too soon when careful report building will solve many problems more easily...
Thanks,
DR
Image
I dont think report methods have any summary functions to calculate percentage difference. You can add up figures, get max and min, standard deviation and percentage rsd but for calculating percentage difference you need custom fields.

If you create a peak real calculated custom field. Tick all or nothing.Search order result set only sample and peak type to All. Presuming your label structure is of the type U0101/U0201 right up to U9901/U9902 then your formula is:

(ABS(U???1.%.(Amount)-U???2.%.(Amount))/((0.5*(U???1.%.(Amount)+U???2.%.(Amount)))))*100

Process a sample set to generate a result set and the results will populate at every 2nd sample ie at U0102 at U0202, U0302 etc.
The problem with Georgelin’s method is that I have to create a custom field for each pair, and it’s quite cumbersome to create so many custom fields.

EmpowersBane’s method seems really good to me, but won’t Empower perform the calculation on U0101 and U0202 instead of calculating on U0101 and U0102?
Hi again,

No, my formula worked perfectly for me using that label structure when I tested it on some sample data. It works because Empower only ever uses the most recent U???1 sample in its calculation so U0101, U0201, U0301 etc. Its critical to have All or Nothing ticked for the custom field to work and to keep your label structure to U0101/U0102...U0201/U0202.....U9901/U9902.
Hi

I created the custom field and it works perfectly. It gives me the correct results for the label 02, but although it’s not really an issue, I’m also getting results for U0101, U0201, etc.

Do you have any idea what Empower is using to calculate the results for the U0101 labels?

Thank you for your help it was really helpful :D
Hi, Im glad it works for you.

Is All or Nothing ticked in the custom field editor? That should exclude any results for the 01 portion of the pair of samples. If its still not working with All or Nothing ticked, you can add Summarize Custom Fields as the last line of the sample set before processing and that should just give the correct results for both samples. If not you can do this trick:

Create a Sample, text custom field called Percent_Diff and, in your sample set for every second sample in the sample set (U0102, U0202, U0302 etc), type in Difference in your Percent_Diff column and leave the first sample blank. Then in addition to the custom field I suggested in my previous post (lets just say you called that PerDiff_TwoSamples), create a peak, real, calculated custom field, search order Result Set only, Sample and Peak type All, All or Nothing ticked and the formula is:

EQ(Percent_Diff,"Difference")*PerDiff_TwoSamples+NEQ(Percent_Diff,"Difference")*-1*50000

That will basically look for all instances where the custom field Percent_Diff is populated with the word Difference and will only return the result for that pair in the second sample, and for the first sample a blank cell (which is what -1*50000 looks like in Empower).

One of the above methods should filter the result to only the second sample.
13 posts Page 1 of 1

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 4374 on Fri Oct 03, 2025 12:41 am

Users browsing this forum: No registered users and 1 guest

Latest Blog Posts from Separation Science

Separation Science offers free learning from the experts covering methods, applications, webinars, eSeminars, videos, tutorials for users of liquid chromatography, gas chromatography, mass spectrometry, sample preparation and related analytical techniques.

Subscribe to our eNewsletter with daily, weekly or monthly updates: Food & Beverage, Environmental, (Bio)Pharmaceutical, Bioclinical, Liquid Chromatography, Gas Chromatography and Mass Spectrometry.

Liquid Chromatography

Gas Chromatography

Mass Spectrometry