Filtering by Signal and Value in Chemstation

Hello, I am trying to build a template that selects either Signal 1 (DAD1) or Signal 2 (FLD1) based on the following rules:

1. If the Compound Amount is >0.250 by both signals, select the Compound Amount given by Signal 1

2. If the Compound Amount is <= 0.250 by FLD1, select Compound Amount given by Signal 2. 

3. If the Compound Amount is >0.250 by FLD1 and <0.250 by DAD1, select Compound Amount given by Signal 1. 

I am having trouble getting the third rule to work and am not sure how to do this. The first two I have accomplished by making two tables, filtering for signal and value.

Parents Reply
  • Hello,

    Create a hidden table at the top filtered on signal 2. Store the compound amount as an aggregator keyed on Injection_id + compound_name. In the display table filter it for signal 1 and then use something like the expression below to choose which value to display. You can use the hard coded value instead of a report parameter as I did. Do not place the value inside "" as that will denote it as text. Since you are storing only one value you can use any of the aggregate functions' min, max, sum to retrieve the value. Please note you cannot use a variable as that will not accept keys with multiple components. 

    =IF(Max(CompAmt(Injection_ID + Compound_Name)) <= ReportingLimit,Max(CompAmt(Injection_ID + Compound_Name)),Compound_Amount)

Children
Was this helpful?