Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

'Not equal' mulitiple values in a Set analysis

I am trying to exclude a couple of values from a list within a set analysis - see attached example.Query NOT equals.JPG

Can anyone help? This doesn't appear to work as I thought it would. There is Admit method has a long list of values and am tryong to avoid listing them in the analysis expression.

Thank you

4 Replies

Re: 'Not equal' mulitiple values in a Set analysis

This should have worked (even though it is showing the red line). But you can try this as well:

=Sum({<[Week Ending] = {'>=$(VwkEnd) <= $(VwkEndMax)'}, [Admit method] = e({<[Admit method] = {'GP Admission', 'Emergency Department'}>})>} Admissions)

Best,

S

terezagr
Contributor III

Re: 'Not equal' mulitiple values in a Set analysis

Try this:

=Sum({<[Week Ending]={">=$(VwkEnd)<=$(VwkEndMax)"}> - <[Admit method]={'GP Admission','Emergency Department'}>}Admissions)

Not applicable

Re: 'Not equal' mulitiple values in a Set analysis

Try this...

=Sum({<[Week Ending]={">=$(VwkEnd)<=$(VwkEndMax)"}, [Admit method]= {'*'} - {'GP Admission','Emergency Department'} >}Admissions)


If you will need insert a lot of fields in the Admit Method...you can load a XLS File with this fields linked to the data, so you can write:


Sum({<[Week Ending]={">=$(VwkEnd)<=$(VwkEndMax)"}, [Include Admit method]= {'Y'} >}Admissions)


Your XLS file wil need two columns...[Admit method] and a column with a Y or N value. It will became easier to make adjust in the future.

Not applicable

Re: 'Not equal' mulitiple values in a Set analysis

Thank you for your help

Community Browser