Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

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?

Tags (3)
1 Solution

Accepted Solutions

Re: Expression with AND

Hi Pedro this expression work as an and:

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

5 Replies

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)

awhitfield
Esteemed Contributor

Re: Expression with AND

Hi Pedro,

could you post some example data please?

Cheers

Andy

Not applicable

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)

Not applicable

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.

Community Browser