Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jayati_shrivast
Contributor III
Contributor III

COUNT expression in KPI

Hi All, 

I need to implement following sql query in KPI

SELECT count(distinct FIELD_1) FROM TABLE_1 where 
 (FIELD_2 in ('1','2','3','4','6','7') or FIELD_2 like ('%,1') or FIELD_2 like ('%,2')
or FIELD_2 like ('%,3') or FIELD_2 like ('%,4') or FIELD_2 like ('%,6')
or FIELD_2 like ('%,7'));

FIELD_2 has values as follows

FIELD_2

1

3,3

3,3,3

5

7

3,4

5,3 

and so on.....

Pls help me as to how to implement this in Kpi.

1 Reply
santhiqlik
Creator
Creator

Hi,
Try this....
count({<FIELD_2 = {'1','2','3','4','6','7','*1','*2','*3','*4','*6','*7') >} distinct FIELD_1)