Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Qlik Cloud Maintenance is scheduled between March 27-30. Visit Qlik Cloud Status page for more details.
Showing results for 
Search instead for 
Did you mean: 

Counting Multiple condition


I have a column called Order status which has "OK", "NOK' and "-" as different status. I want to count total orders enslaved and total orders not enslaved.

For enslaved I want the count of "OK" and "-" whereas for Not Enslaved I want the count of  "NOK"

I am using the below expression but it is giving me wrong results.

='Enslaved:'&' '& count({<OrderStatus={'OK'},OrderStatus={''}>}OrderStatus) & chr(10) &

'Not Enslaved:' & ' ' & count({<OrderStatus={'NOK'}>}OrderStatus)

Could anyone please help me with this urgently?

2 Replies
Creator II
Creator II

Hello, I suggest reviewing the data treatment because the value "-" messes up the set analysis, follows example

Best Regards


Hi Akash, each field can be only applied once in sdet analysis and there are 2 OrderStatus, multiple values can be assigned separated by commas:

='Enslaved:'&' '& count({<OrderStatus={'OK','-'}>}OrderStatus) & chr(10) &

'Not Enslaved:' & ' ' & count({<OrderStatus={'NOK'}>}OrderStatus)

Also null() is not a selectable value, maybe with:

='Enslaved:'&' '& (count({<OrderStatus={'OK'}>}OrderStatus)+NullCount(OrderStatus)) & chr(10) &

'Not Enslaved:' & ' ' & count({<OrderStatus={'NOK'}>}OrderStatus)

Or, if you have a field in the same table that always have a value to count:

='Enslaved:'&' '& count({<OrderStatus-={'NOK'}>}OtherField) & chr(10) &

'Not Enslaved:' & ' ' & count({<OrderStatus={'NOK'}>}OrderStatus)