I have a table that has 2 fields I need to use to calculate a sum, MR and Setup.
MR is an integer field
Setup is a Choice List field
I can calculate the number of occurrences containing ‘DD’ using this formula
count = sum(
'DD' in setup for trade in $group
for setup in trade.Setup
if trade.MRTrade == True
)
return count
I can calculate a filtered sum of the MR field using this formula. Stack is a Choice filed (not Choice List). This is an example, I don’t want to filter on this field.
sum(trade.MR for trade in $group
if trade.Stack == 'LL'
)
But when I try to filter the Setup list field and sum MR, this formula gets me 0.
sum(trade.MR for trade in $group
if 'DD' in trade.Setup
)
How do I filter the Choice List and get a sum of the MR field?
thanks