Peak, real CF for getting a test compliance of sereval results
I need to create custom field to get whether some results comply a test.
I analyze 10 samples and get a result for each one
(let´s call this custom field: Amount_UC: peak/real/calculated Amount_VAL_UC_HG_CLMA_2+Amount_VAL_UC_HG_FENI_2+Amount_VAL_UC_HG_PARA_2)
Then I get the mean of those 10 results (let´s call this custom field: Media_amount_UC peak/real/calculated
SAME.%.SAME.AVE(CCompRef1[Amount_UC]))
Then I get the 85% and the 115% of the mean (let´s call this custom field: Limite_inf_UC_comp1 and Limite_sup_UC_comp1
peak/real/calculated
Media_amount_UC_comp1*0.85 and Media_amount_UC_comp1*1.15)
Then I get whether each of those 10 values comply being in between 85%115% of the mean (let´s call this custom field: Vered_num_indiv_testB_comp1
peak/enum/calculated (use as value, translation 1, 0, 1 ENUM(LT(Amount_UC,Limite_inf_UC_comp1),GTE(Amount_UC,Limite_inf_UC_comp1)<E(Amount_UC,Limite_sup_UC_comp1),GT(Amount_UC,Limite_sup_UC_comp1))
Then I get how many values are out of that 85115% of the mean (let´s call this custom field: Sum_ver_num_indiv_testB_comp1
peak/real/calculated
SAME.%.SAME.SUM(CCompRef1[Vered_num_indiv_testB_comp1]))
It seems as if it is not working (see file attached)
The problems comes with the last custom field. It seems as if it is calculating a value (0/1) and then adding each of the values as it is getting through all the 10 values..
Don´t know If I am being clear...
Any help would be like a present
I analyze 10 samples and get a result for each one
(let´s call this custom field: Amount_UC: peak/real/calculated Amount_VAL_UC_HG_CLMA_2+Amount_VAL_UC_HG_FENI_2+Amount_VAL_UC_HG_PARA_2)
Then I get the mean of those 10 results (let´s call this custom field: Media_amount_UC peak/real/calculated
SAME.%.SAME.AVE(CCompRef1[Amount_UC]))
Then I get the 85% and the 115% of the mean (let´s call this custom field: Limite_inf_UC_comp1 and Limite_sup_UC_comp1
peak/real/calculated
Media_amount_UC_comp1*0.85 and Media_amount_UC_comp1*1.15)
Then I get whether each of those 10 values comply being in between 85%115% of the mean (let´s call this custom field: Vered_num_indiv_testB_comp1
peak/enum/calculated (use as value, translation 1, 0, 1 ENUM(LT(Amount_UC,Limite_inf_UC_comp1),GTE(Amount_UC,Limite_inf_UC_comp1)<E(Amount_UC,Limite_sup_UC_comp1),GT(Amount_UC,Limite_sup_UC_comp1))
Then I get how many values are out of that 85115% of the mean (let´s call this custom field: Sum_ver_num_indiv_testB_comp1
peak/real/calculated
SAME.%.SAME.SUM(CCompRef1[Vered_num_indiv_testB_comp1]))
It seems as if it is not working (see file attached)
The problems comes with the last custom field. It seems as if it is calculating a value (0/1) and then adding each of the values as it is getting through all the 10 values..
Don´t know If I am being clear...
Any help would be like a present
0
Comments

I would change your last custom field in a Result type custom field instead of a peak type custom field, but that might not be the reason it is not working properly. Maybe the "All or nothing" tickbox might do the trick.
Do you process your sample set in a chronological order? or do you process with the "Calibrate/Quantitate" functions at the end?
That might also cause the summarization of the custom field in your samples.
0 
Hmm...I also think its that last CF causing the issue. I tried a peak, real CF, tried a peak, bool with RANGE, I tried making a Result CF from it, tried ticking All or Nothing but Im still hitting the same issue you are, with a cumulative addition rather than a final stored sum value. It might be, as the other poster suggested, something to do with the order that the Amount field is calculated and it may be linked to your sample set and when you do the final quantitation.
The only suggestion I can make it is to add a SUM function to the Vered_num_indiv_testB_comp1 custom field in your attached report method which will give you the total number of values outside your range. You dont seem to have a further use for that final CF so it may have to stay as a report method visual field instead of a separate CF...0 
Thanks!
Jovvor, I put a line after all the injections with "Summarize custom fields". Would that be the problem? What do you suggest us in order to process properly? What about the alphabetical order?
Empower2019, The problem that I am facing is that even though Vered_num_indiv_testB_comp1 custom field is a peak, real, calculated custom field it does not allow me to add any function in the report. Would that be the problem?0 
It seems as if I did not solve the issues..0

In your report right click on the custom field column, select column properties then add the SUM function and precision from here and save report. This will sum all the values of 1 to give your total number of values outside the range.0

You could put the field "SAME.%.SAME.SUM(CCompRef1[Vered_num_indiv_testB_comp1]))" in your report method. (not in a table but straight in the report).
than doubleclick to access the field properties and at the bottom of it in the Summary Function. select Max in the Funtion Type. Rename the Function Name to "Total" or something.
You could also put the field "ENUM(LT(Amount_UC,Limite_inf_UC_comp1),GTE(Amount_UC,Limite_inf_UC_comp1)<E(Amount_UC,Limite_sup_UC_comp1),GT(Amount_UC,Limite_sup_UC_comp1))" like that and use the Summary Function "Sum" and also rename that one.
That is another way to report them i guess.
Be wary that you need to Order and Filter them accordingly. Else it will search all of your injections in your reporting method for those results and you will come up with faulty numbers.
For your question about processing order. I think that would be your SOP that you must follow.
What we do, processing at the end starting with standards, controls and samples.
So you have the full calibration line over your whole sample set to process with.
But like I said, I think that is what is defined within your own SOP.0 
The problem is that when I don right click on the custom field column, select column properties and add the SUM function and precision from here I do not get aby value. It seems as if it is not considering those 1/0 as values even though I select value as in the custom field creation
0 
Ah it seems the values from a Bool CF output cannot be added. The only way to change this is to create a Peak, Real CF:
LT(Amount_UC,Limite_inf_UC_comp1)*1+GT(Amount_UC,Limite_inf_UC_comp1)*1+RANGE(Amount_UC,Amount_UC,Limite_inf_UC_comp1,Amount_UC,Limite_sup_UC_comp1)*0.
In the report method for this CF right click and add SUM and it will give you a total. I just checked it there and it worked for me. You can always rename SUM as well to something more appropriate like Total Values Outside Range.0 
Or change the Use as to value instead of position and add 0 and 1 into the field respectively to the 0 and 1 positions.
That way the boolean must be seen as a value.0 
Thanks for your help! Once again you have solved all the issues we faced!
0