Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

where claus

hi,

i want to execute this query in qlikview:

select count(field) where field='value1' or field='value2'

11 Replies
PrashantSangle

Hi,

Through set analysis try like

Count({<field={'value1,value2'}>}field)

or

try

count(if(wildmatch(field,'value1','value2'),field))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
alexandros17
Partner - Champion III
Partner - Champion III

you have forgotten the table:

select .... FROM TABLE where ...

MK_QSL
MVP
MVP

COUNT({<field = {'value1','value2'}>}Distinct field)

or

COUNT({<field = {'value1','value2'}>}field)

Anonymous
Not applicable
Author

Try with this in the script:

DataTable:

LOAD Count(field) as numberfield

FROM yoursource

WHERE field='value1' or field='value2';

Marc.

Not applicable
Author

i want to execute these requests in text object:

select field where field='value1' and 'value2'

and also:

select count(VAR1) where field='value1' and 'value2'

anbu1984
Master III
Master III

Your sql is correct except "From Table" as mentioned by Alessandro.

Do you want to know how to connect to database and execute the sql?

anbu1984
Master III
Master III

=count({$<field={'value1','value2'}>}VAR1)

Not applicable
Author

the table is not a problem for me, i want just to execute those request in qlik, that's all,

Not applicable
Author

thank the second request works, but how i can execute the first one:

select field where field='value1' and 'value2'