# How can you create a CF to get whether 2 or more values meet the requirement?

I want to create a CF to get whether 2 or more values are for example less than 85%. How can I do that?
I know how to get a Pass/Fail CF for one individual value:

peak/boolean/calculated; (GTE(Amount_igual_TD,85)) and value 0. Fail, value 1. Pass

I get the individual results and the Pass/Fail statement.

But how is it with two or even more than two?

Thanks

• edited January 24
Create a Peak, Enumerated CF and the formula starts with ENUM and all boolean arguments are separated by commas, and the values in the Translation Table correspond to the order of arguments and contain whatever value you want as an output for that translation. Here is an example evaluating area over 4 different ranges:

ENUM(LT(Area,1000),RANGE(Area,1000,10000),RANGE(Area,10000,100000),GT(Area,100000))

Thats 4 different possibilities for Area so Empower stops at the first argument which proves true and returns whatever is in the translation table as the output. So using my example you have 4 different possibilities and when Use As is set to Position or Text, the 4 entries in the translation table are...Low Yield, Fair Yield, Ideal Yield and High Yield. An area of 16765 for a component would return Ideal Yield and an area of 654 for another component would return Low Yield using this CF.

Remember too that Empower will always return the first argument that turns out to be true so its possible to have an argument further upstream in your formula like LT(Height,1000) but if a previous argument such as LT(Area,1000) is true then that translation becomes the final value for the CF for that component.

Another method is to use the symbol & in your Bool CF like GTE(Amount_igual_TD,85)&GT(Second_CF,85)

Both values must be GT 85 to return a true (position 1) output in your table.

• I see..

I have another scenario which is the following:

Peak/Boolean/Calculated
(GTE(Amount_igual_TD,Desplegable_Q_5_comp1))
And in the translation definition table:
Value 0. Fail
Value 1. Pass
So I get a fail/pass statement for each peak

What if I want to get a statement when 2 peaks meet the requirement
(GTE(Amount_igual_TD,Desplegable_Q_5_comp1))

I would like to know with a custom field how many result meet the requirement and pass and how many fail instead of getting as many statements fail/pass as peaks I have

Is it possible?

Thanks you
• >What if I want to get a statement when 2 peaks meet the requirement

Perhaps try a summary CF, something like:

%.%.%.SUM((GTE(Amount_igual_TD,Desplegable_Q_5_comp1)))
Replace wildcards as necessary, don't forget to summarize custom fields, and have your boolean check to translate into 0's and 1's, so the SUM function counts all the pass results. From there you should be able to see how many peaks pass, and in a separate field do a boolean check if this sum equals 2. For counting fails just replace GTE with LT.

• Another way to do it is to make sure your Bool CF of (GTE(Amount_igual_TD,Desplegable_Q_5_comp1)) which I will refer to as CF_1 is set to Use as Value, and put in 1 for Pass and 0 for Fail. Then to add up the amount of peaks which pass per injection, or sample, create a Result Real CF Result Set Only, formula:

SUM(CF_1*(EQ(CF_1,1))) and make sure to set precision to 0.

This will sum up all of the peaks in the injection which Pass the criteria and give a final number of passing peaks. It wont work for the Fails though as it will just add up a series of zeroes, giving an overall zero. If you wanted total failing peaks, best to do what Paul_3 suggested in an intersample CF above.

• Hi PMJ - It looks like you are well on your way to having this solved but I would like to suggest that there may be some additional help in the Waters Knowledge Base.  Maybe check out this "Tip of the week" - How to use Empower to evaluate whether the sample meets specific criteria - WKB68991.

Good Luck!
• Another option might be:

ENUM(EQ(Peak1,Specification1)&EQ(Peak2,Specification2)

Change the EQ to what ever fits (greater than, less then, etc). You would need to code the variants (EQ and NEQ, or GT and LT, or LT and GT) around this as well to produce the required failure translations for the enumerated list.