5 Replies Latest reply: Mar 26, 2015 12:49 PM by Pedro Pereira

# Expression with AND

Hi,

I want to calculate an expression where I want to count the products sold with price higher than 5e and the product type is chocolate by day. How can I do that?

This counts the price higher than

Count( {\$<Price={"<=5"}>}Day

)

This counts the products equals to chocolate

Count({\$<Type={"Chocolate"}>}Dia)

But I want the products with price higher than 5 AND type equal to chocolate.

Can anyone help me?

• ###### Re: Expression with AND

Hi Pedro you can filter more than one field in set analysis:

Count({\$<Price={"<=5"}, Type={"Chocolate"}>}Dia)

Btw it will be Prices equal or less than five, for higher than 5 it should be:

Count({\$<Price={">5"}, Type={"Chocolate"}>}Dia)

• ###### Re: Expression with AND

Hi Pedro,

could you post some example data please?

Cheers

Andy

• ###### Re: Expression with AND

What I put is wrong. These are the correct expressions:

count ({\$<Price={">5"}>}Day)

Count( {\$<Type={"Chocolate"}>}Day)

I want the condition AND. It should be something like :

count ({          \$<Price={">5"}> AND  \$<Type={"Chocolate"}>          }Day)

It should be simple but it is missing me something

• ###### Re: Expression with AND

Hi Pedro this expression work as an and:

Count({\$<Price={">5"}, Type={"Chocolate"}>}Day)

• ###### Re: Expression with AND

You answear twice, but I got what I wanted. I thought I had to do it with "And".

Thank you very much.