Discussion board where members can learn more about Qlik Sense App Development and Usage.
Hi,
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?
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)