Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Where am i going wrong? I want to set up an expression to capture fields selection in ABC, I know using a LIKE the OHL and RED are unique, but I cant see how to get the LIKE function working
Sum({$<[ABC]=({$<[{getfieldselections([ABC]) LIKE '*OHL*,*RED*'}>]data)
plus how do I paste code, the insert>plain does not seem to be working???
Is there a tutorial?
Thanks,
Neil.
Hi,
try this
Sum(if(wildmatch(getfieldselections([ABC]),'*OHL*,*RED*'),data))
Regards
try
Sum({$ <[ABC]={"*OHL*", "*RED*"}>} data)
Hi,
When I call the field with the full name this works
sum({$<[ABC]={[Red Threshold (OHL)]}>}Data)
but not with the Like function
Sum({$ <[ABC]={"*OHL*", "*Red*"}>} data)
Any ideas
Neil
I understood you want to sum data when ABC like OHL or Red
data and ABC are fields
OHL Red values of ABC field
Hi Neil,
see the attached simple example, =Sum({$ <[ABC]={ "*ohl*","*red*"}>} data)
works fine in this case.
HTH - Regards,
Andy
What I would like is to sum when OHL and RED in the same filed.
The above statement will sum all reds regardless of OHL in the field.
Yes - the above statement is an OR not an AND.
If you need an AND logic you will have to use intersection between record sets and not the element sets.
Something like this might work for you:
=Sum( { $<[ABC]={"*ohl*"}> * $<[ABC]={"*red*"}> } data )
try with intersection
sum( {$ <ABC={"*RED*"}*{"*OHL*"}>} data)
Gotcha,
you mean =Sum({$ <[ABC]={ "*RED*OHL*"}>} data)
HTH Andy