5 Replies Latest reply: Apr 23, 2017 7:32 AM by vineeth pujari

# count if x = O or Y= O

hello

i have a little problem i have three table

table tiers ; cod_tiers , age , nom , prenom

table presence ; cod_tiers , present ( yes , no , null )

table vote ; cod tiers , vote ( yes , no , null )

what i want is count cod_tiers if present = yes or vote = yes

i tried this but it is incorrect =count({<VOTE={'O'},PRESENCE={'O'}>} COD_TIERS) this give me present = yes and (not or ) vote = yes

• ###### Re: count if x = O or Y= O

Hello,

Try the expression:

Count({\$<COD_TIERS=P({1<PRESENT={'YES'}>}COD_TIERS),

COD_TIERS=P({1<VOTE={'YES'}>}COD_TIERS)

>}COD_TIERS)

Also, for the performance of the app, I recommend a single FACT table with the necessary data. See the attached file.

• ###### Re: count if x = O or Y= O

thank you

• ###### Re: count if x = O or Y= O

Cheers

V

• ###### Re: count if x = O or Y= O

Count({<PRESENT={'YES'}>+<VOTE={'YES'}>} DISTINCT COD_TIERS)

For other similar problems, see my reply on this post

Re: Nested Set Analysis - Customer bought in both time periods

• ###### Re: count if x = O or Y= O

thank you

i learned something new