Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

how to use count with multiple criteria

I am trying to perform a ratio calculation that requires multiple criteria.  I am trying to get the percentage of orders that meet 2 criteria (visit column has a "1" AND Revisit column has "0").  I used a comma to separate the criteria at first but it doesn't seem to give the correct answer.  Is it correct that a comma would separate multiple criteria? Any ideas on what I may be doing wrong?

Thanks!

1 Solution

Accepted Solutions
MVP
MVP

Re: how to use count with multiple criteria

Not sure what you have already tried, but may be this:

Count(DISTINCT {<Visit = {1}, Revisit = {0}>} Orders)

2 Replies
igdrazil
Contributor III

Re: how to use count with multiple criteria

Hi Sam,

It would look somewhat like this:

sum( {$<Visit = {'1'}, Revisit = {'0'}>} counter).

Hope this helps, good luck!

Regards

Chris

MVP
MVP

Re: how to use count with multiple criteria

Not sure what you have already tried, but may be this:

Count(DISTINCT {<Visit = {1}, Revisit = {0}>} Orders)