Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
raymondwee
Contributor III
Contributor III

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
raymondwee
Contributor III
Contributor III
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
Partner

raymondwee
Contributor III
Contributor III
Author

Thanks, Nagesh.

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

raman_rastogi
Partner
Partner

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

raymondwee
Contributor III
Contributor III
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
Partner

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

Use Item as a " Field".

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


Regards

Raman

raymondwee
Contributor III
Contributor III
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)

raymondwee
Contributor III
Contributor III
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.