Custom Field to calculate the %Difference between duplicate sample preps using %Area

I need to calculate the %Difference between duplicate sample preps using %Area. The calculation from the test procedure is
(%Area Prep 1- %Area Prep 2)/(Average %Area Prep 1+ Prep 2) x100

I setup the sample set with labels, SMP 1, prep 1 as U101, SMP 1, prep 2 as U102, SMP 2, prep 1 as U201, SMP 2, prep 2 as U202 and Summarize Custom Calculations.

I created (U%1..(% Area)-U%2..(% Area))/((U%1..(% Area)+U%2..(% Area))/2)*100 as the custom field, search order Result Set only, however, it reports results for 
U101+U102, U102+U103, U103+U104 when I only want results for U101+U102 and U103+U104.

Any help would be greatly appreciated
thank in advance
Marian

Answers

  • Its likely your label structure thats the problem. Empower processes each set of samples line by line so line 1 before line 2. Line 2 before Line 3 etc. At sample Line U103, Empower attempts to calculate your CF using all the information it has at this point and the most recent result is the U102 line, hence why it returns a percent diff between U102 and U103. At line U104 it behaves the same, returning your second percent difference between U103 and U104, which is what you are looking for.
    Tie your labels down a bit more in the formula and take out the wildcards. Plus tick All or Nothing to only return the answer at the latter sample. You dont need Summarize Custom Fields as you arent using any summary formulas such as AVE, MIN or MAX. The formula changes to:
    ABS(U101.%.(%Area)-U102.%.(%Area))/((0.5*(U101.%.(%Area)+U102.%.(%Area))))*100 
    The All or Nothing ensures you wont get a nonsense result on the first line of the equation with only half the arguments. Without this option ticked the CF would return the %Area value of U101 minus nothing (since Empower hasnt reached U102 yet) divided by half of the %Area of U101 times 100 which isnt what you want. All or Nothing will return the correct value for each cf at the latter sample i.e U102 and U104. Repeat the CF for your second set of samples, substituting the U101 and U102 with U103 and U104. Good luck!