# How to calculate the difference between two sample with amount calculated with CF

Hi!

We want to calculate de difference between two inyections of the same sample of the amount which is calculated with CF

• We´ve made a CF which calculate the difference, but also shows the biggest amount´s value.
• Problem solved then?
• yes!!!!!!
• It´s not solved! we want to calculate the difference between the amount (calculated with CF) of sample M1 and sample M2, M3 and M4 and so on. Sometimes, if we change the labels to verificate that the CF works, appears two results, three... We have made one CF for making the difference between M1 and M2, another one for M3 and M4.. We don´t know if exists another way to make it right.
• There is a way to do what you want in just one CF but can you clarify how you are calculating the difference between the amounts in 2 samples? For instance, M1 and M2, two amounts. Do you calculate it as: (Amount in M2-Amount in M1)/Amount in M1 * 100?
• The way that we calculate the difference is Amount in M2-Amount in M1.
• Ok, so create a peak, real custom field with the formula:

M%.%.(Amount)-M%..(Amount) and make sure all or nothing is ticked.

This way M2 will subtract the most recent M...sample amount which is M1, and then M3 will subtract the most recent amount which is M2, same with M4 etc etc.