Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
i want to do :
count(resultat_1={''} AND (provenance ={'xx'} or provenance2={'yy'}),test_Num)
how can i do that?
thank you
Like tis
Count({<resultat_1={''} , provenance2 = {'xx' or 'yy'}>} test_num)
OR
Count({<resultat_1={''} , provenance2 = {'xx'} or provenance2 = {'yy'}>} test_num)
OR
Count({<resultat_1={''} , provenance2 = {'xx'} or {'yy'}>} test_num)
But, your expression does seems two fields are different, Can i know these two diff
provenance & provenance2
Hi Rachel,
Try:
count({$<resultat_1={''}>*(<provenance ={'xx'}>+<provenance2={'yy'}>)}test_Num)
Good Luck
Andrew
Another option could be this, in addition to effinty2112's solution:
Count({<resultat_1 = {''}, provenance = {'xx'}> + <resultat_1 = {''}, provenance2 = {'yy'}>} test_Num)
thanks Sunny T. but its not working .......... any other idea?
its 2 differents things.
resultat_1 has to be empty and (field_1 should be {'xxxx','yyyy' } or field_2 should be {'xxxx','yyyy' })
Would you be able to share a sample where this isn't working? Also share what the output you are expecting to see
Hi Rachel,
Have you tried Sunny's suggestion or mine? They should both give the same, hopefully correct, answer. If they return a value which is not what you expect please advise.
I hope you're not put off by the set arithmetic. You have three conditions:
A = resultat_1={''}
B = provenance ={'xx'}
C = provenance2={'yy'}
The statements inside the <> brackets define sets, collections of records. When Sunny writes <A,B> then this is a set where conditions A and B are BOTH true and when his two sets are written with the operator '+' such as
<A,B>+<A,C>
then we're looking at the union of the two sets that he defined in the brackets. Overall we're picking the set where (A and B) or (A and C) are true.
Mine is written differently but it means the same. the '*' means intersection of two sets i.e. the records that belong to both.
A and (B or C) is the way I wrote it.
Either way you get:
I hope I've not bored you with something you're already familiar with!
Kind regards
Andrew