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: 
william_denholm
Contributor III
Contributor III

Count records filtered by two fields

Hello,

Trying to do a count of records where the type is 'Order' and the status is 'Accepted'

Data in the format below

NumberOrderStatus

1

ORDAccepted
2ORDRejected
3MESSAGEAccepted
4ORDAccepted

So I'm expecting the count of Accepted ORD to be 2.

I've tried to COUNT(IF(Order = 'ORD' AND Status = 'Accepted', Order)) but this doesnt seem to work.

Thanks.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try count({<Order={'ORD'},Status={'Accepted'}>}Number)

But the expression you posted works fine with the data you posted too. Make sure to use the exact case sensitive file names.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try count({<Order={'ORD'},Status={'Accepted'}>}Number)

But the expression you posted works fine with the data you posted too. Make sure to use the exact case sensitive file names.


talk is cheap, supply exceeds demand
sunny_talwar

Try this:

=Count({<Order = {'ORD'}, Status = {'Accepted'}>}Order)

william_denholm
Contributor III
Contributor III
Author

Thank you!