Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to countif

How do I do a countif field is 'y' in Qlik sense?

And could you point me to the "manual" where syntax and functions are shown?

Thanks a lot.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thanks, all.

Managed to figure out that it should be this:

Count({<[Availability]={'Yes'} >} [Item])

Was wondering why we need to include [ ] for both fields...Does anyone know?

View solution in original post

10 Replies
nsetty
Partner - Creator II
Partner - Creator II

Anonymous
Not applicable
Author

Thanks, Nagesh.

how do I do it if I want to count if record is 'y'?

raman_rastogi
Partner - Creator III
Partner - Creator III

You can use set analysis or if condition for this

ex-

Count({<Field Name={' Value'} >} Field)

https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetA...

Or

Count(if(Field name=' Value' ,Field1,Field2 ))

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ConditionalFun...

Regards

Raman

Anonymous
Not applicable
Author

Thanks, Raman.

I am new.

For this table:

S/N    Item   Availability

1        flower   Yes

2        plant     No

3        laptop   Yes

Count({<Availability={'Yes'} >} Field)

What should I key in for "field"?

raman_rastogi
Partner - Creator III
Partner - Creator III

If you want to count item which have availability "Yes".

Use Item as a " Field".

ex- Count({<Availability={'Yes'} >} Item )


Regards

Raman

Anonymous
Not applicable
Author

Thanks.

It shows an error in set modifier expression...

sasiparupudi1
Master III
Master III

Count(if(Availability='Yes',Item)

Or

Count({<Availability={'Yes'}>}Item)

Anonymous
Not applicable
Author

Thanks, Sasidhar.

But it still shows error.

I am using Qlik Sense. Not sure what's wrong.

justinphamvn
Creator II
Creator II

Hi,

Can you share your Application with sample data ?

Thanks,

Justin.