Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count If

Hi Experts,

I am trying to do a count where the values must be in a specific range.

My first count to check whether my load is less than a Ton works perfectly:

Num(Count ({< CYEAR = {'2012'}, Load = {"<1000"} >} DISTINCT LineNumber),'# ##0')

I now need to count where my load is between 1001 and 3000 and then another that is 3001 to 5000.

Can you please assist in telling me how to add some kind of an If statement into it.?

Thanks in Advance!

Wynand.

1 Solution

Accepted Solutions
vincent_ardiet
Specialist
Specialist

Hi,

Try with :

Num(Count ({< CYEAR = {'2012'}, Load = {">1000<=3000"} >} DISTINCT LineNumber),'# ##0')

Regards,

Vincent

View solution in original post

2 Replies
vincent_ardiet
Specialist
Specialist

Hi,

Try with :

Num(Count ({< CYEAR = {'2012'}, Load = {">1000<=3000"} >} DISTINCT LineNumber),'# ##0')

Regards,

Vincent

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=Num(Count ({< CYEAR = {'2012'}, Load = {">=1000<=3000"} + {">=3001<=5000"} >} DISTINCT LineNumber),'# ##0')

Hope this helps you.

Regards,

Jagan.