# %RSD intersample calculation with custom fields

Hello everyone,

I'm having some troubles with the custom field calculations. I'll explain my case with a table. We have 3 samples, with 3 replicates and 3 injection each. We use the labels that follow

U0101 (3 inj)

U0102 (3 inj) U01

U0103 (3 inj)

U0201 (3 inj)

U0202 (3 inj) U02 U

U0203 (3 inj)

U0301 (3 inj)

U0302 (3 inj) U03

U0303 (3 inj)

Could you please help me with this?

Thank you very much in advance

I'm having some troubles with the custom field calculations. I'll explain my case with a table. We have 3 samples, with 3 replicates and 3 injection each. We use the labels that follow

**(1)****(2)****(3)**U0101 (3 inj)

U0102 (3 inj) U01

U0103 (3 inj)

U0201 (3 inj)

U0202 (3 inj) U02 U

U0203 (3 inj)

U0301 (3 inj)

U0302 (3 inj) U03

U0303 (3 inj)

**(1)**To perform the injections average and %RSD I use the syntax**CF1:SAME.%.%.AVE(Amount)**or**SAME.%.%.%RSD(Amount)**and it gives you 9 values**(2)**After that I create different CF with this syntax and you get 3 values__CF2:__**U01%.%.AVE(CF1)**o**U01%.%.%RSD(CF1)**__CF3:__**U02%.%.AVE(CF1)**o**U02%.%.%RSD(CF1)**

__CF4:__**U03%.%.AVE(CF1)**o**U03%.%.%RSD(CF1)**

**(3)**At the time of performing the average of te three values (U01/U02/U03) I have 2 options:**-****CF5:****U%.%.AVE(Amount)**it gives you the average of the 27 values**-****(CF2+CF3+CF4)/3**it makes the average of the 3 values (U01/U02/U03). The result is the same in both cases.**But in the case of the %RSD we cannot use**

--

**U%.%.%RSD(Amount)**because it gives you the %RSD of the 27 values and we want the %RSD of U01,U02 and U03. The result is not the same.**So we want to calculate the %RSD of U01/U02/U03 and we dont know which syntax do we have to write in the custom field**

Could you please help me with this?

Thank you very much in advance

0

## Comments

Hi

If it is Average and % RSD you are after then can you not use the summary function in report with data filter conditions U01, U02 and U03. U* for n=27

And/or right click on columns to hide them for summarising purposes Ie label for instance

Then you only need 2 CFs in total. The first is SAME.%..AVE(Amount) and the second is SAME.%..%RSD(Amount). Set search order to Result Set Only and when your result set is generated you should have 3 values each for each set of samples for both CFs, so an Average Amount per component for all the samples as per U1 then U2 etc. Same for %RSD- you now have the 3 figures that you want a further %RSD on instead of including the 27 individual amounts.

To achieve this select your results, create a summary by all report and pick Amount Component table which is offered as standard. Instead of amount though, under "Component Summary" pick your CF used as per the SAME.%..%RSD(Amount) so for example call it Incremental_RSD then add a summary function of %RSD on this CF which is in the same tab as the Component Summary tab in the table. Set min and max and reporting precision as required.

Next add some sample info to the table on the 1st tab so definitely add samplename and label and injection so you can clearly see the samples and their associated RSD value per 3 samples. Dont add peak type fields like Area or Retention time as it wont work.

Apply all your changes and bingo- you now have a table which shows both the RSD value per component per 9 injections then the RSD value of these 3 values at the end of the table. Make sure to order by Date Acquired ascending then Injection ascending for this to work.

Same for Average just pick the Average CF under component summary and add the Mean function to get the overall average amount. Hope this helps.

Edit: scrap the injection ascending order as the overall RSD values will be repeated and affect the final RSD value at the end. You only want 3 numbers in this table so to filter it to achieve this you can either filter by result id and pick the result id of the last injections of U1 U2 and U3 to give you 3 numbers to get an overall RSD on.

Or...create a sample enum CF called Reference and set the Use as to Text. Have 2 entries in it N/A and RSD. In your sample set set a value of RSD on injection 3 of the final U1 the final U2 and the final U3 sample. Leave all other lines as N/A. Then process run and in the component table filter by Reference = N/A. This should lock in only the 3 RSD values as per injection 3 of U1 to U3 (remember injections 1 and 2 will be the same value but their inclusion in the table will skew that final RSD value). Now your final RSD value of the 3 values should be fine.

Thank you for your comments but I am not sure that it could work.

I cannot use U1 for the 9 injections instead of u0101,u0102 and u0103 because ech of them has a different sample weight, and I use sample weight in the calculations, so if I used only U1,U2 the calculations would be using which sample weight??

Im glad you got it to work anyway.