Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

homersimpson
Contributor III

Count if

Hi,

i want a chart function like: count("products" where "price" < 3)

What is the correct syntax?

I got:

Count({<price = {3}>}products)

But whats the operator for "<"?

Count({<price < {3}>}products) there is an error

regards,

Fritz

1 Solution

Accepted Solutions
Partner
Partner

Re: Count if

Should be:

Count({$

      <Price = {"<3"}>

     } Products)

Also give this a try : http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx

3 Replies
Highlighted
Partner
Partner

Re: Count if

You can use Set Analysis for this.

Count({$

      <Price = {<"3"}>

} Products)

Partner
Partner

Re: Count if

Should be:

Count({$

      <Price = {"<3"}>

     } Products)

Also give this a try : http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx

jolivares
Valued Contributor

Re: Count if

It depends, you can use an expression like Jeroen said, but take care of the "

Count({<Price = {"<3"}>} Products)

Or

Count({<Products= {"Sum(Price)<3"}>} Products)