Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Please suggest how can we get the count with where clause in qlik view
e.g we have following data
Name
Region, IS_OK
A, Y
A, Y
A, N
B, Y
B, Y
C, N
D, N
D, Y
Required Output for the IS_OK = Y
Count A - 2
B - 2
D-1
and
A=1
C=1
D=1 for is_OK=N
use expression
=aggr(count(Region), Region,IS_OK)
You can use Region and IS_OK as dimension, then Count(Region) as expression, or Region as dimension and two expressions:
Count({< IS_OK = {'Y'} >} Region)
Count({< IS_OK = {'N'} >} Region)
For the counts of Y and N respectively
it is easier as you have both dimensions anyway. So count(Region) is sufficient