Hi Team,
I want to sum up the Area % of timed groups by using custom calculation in OL CDS 2.7. marked in red color.
Find maintenance, best practice, and troubleshooting articles.
Hi Team,
I want to sum up the Area % of timed groups by using custom calculation in OL CDS 2.7. marked in red color.
Hello,
You could do it directly in the table with a conditional aggregator and then display the sum in the bottom table. I assume that is what you might be doing now. You can do this with the CCs below. You calculate the total area and then use that with the summed area from the groups to calculate the area percent. Please note the example assumes mulitple signals but if that is not the case it could be done per injection.
Marty Adams
Total Area by Signal
CurrentSignal.AllPeaks.Select(function(x) x.Peak_Area).Sum
GroupAddition by Signal
(CurrentInjection.AllPeaksAndGroupsByName("Group A").Where(function(x) x.Signal.Signal_Name = CurrentSignal.Signal_Name).Select(function(x) x.Compound_Area).First + CurrentInjection.AllPeaksAndGroupsByName("Group B").Where(function(x) x.Signal.Signal_Name = CurrentSignal.Signal_Name).Select(function(x) x.Compound_Area).First) / CurrentSignal.GetDoubleCC("TotalArea") * 100