Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

where claus

hi,

i want to execute this query in qlikview:

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

11 Replies

Re: where claus

Hi,

Through set analysis try like

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

or

try

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

Regards

Regards,
Prashant Sangle

Re: where claus

you have forgotten the table:

select .... FROM TABLE where ...

Re: where claus

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

or

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

marcarreras
Valued Contributor

Re: where claus

Try with this in the script:

DataTable:

LOAD Count(field) as numberfield

FROM yoursource

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

Marc.

Not applicable

Re: where claus

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
Honored Contributor III

Re: where claus

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
Honored Contributor III

Re: where claus

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

Not applicable

Re: where claus

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

Not applicable

Re: where claus

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

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

Community Browser