Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Having a NOT criteria in an expression

Hello everyone,

hopefully this is a quick and easy one

i've got this expression

sum({<[G/L Account No]={'10130', '10045', '10040', '10020', '10110'}, Department={'CAD','EAD'}>}amount

I would like the inverse of this NOT CAD and EAD I tried this (below) but it didn't work (and a few other attemps)

sum({<[G/L Account No]={'10130', '10045', '10040', '10020', '10110'}, Department<>{'CAD','EAD'}>}amount

any help would be greatly appreciated

Thank you

1 Solution

Accepted Solutions
Not applicable

Re: Having a NOT criteria in an expression

Check this below one.

sum({<[G/L Account No]={'10130', '10045', '10040', '10020', '10110'},Department-={'CAD','EAD'}>}amount)

EDIT:Working example of  not equal to with set analysis is attached.

- Sridhar

6 Replies
Not applicable

Having a NOT criteria in an expression

Hi,

Why not just:
sum({<[G/L Account No]={'10130', '10045', '10040', '10020', '10110'}>} amount)
-
sum({<[G/L Account No]={'10130', '10045', '10040', '10020', '10110'}, Department={'CAD','EAD'}>} amount)

/@Ungvall

Not applicable

Re: Having a NOT criteria in an expression

Hi,

There are about 20 additional departments and i Didn't want to have

sum({<[G/L Account No]={'10130', '10045', '10040', '10020', '10110'}, Department={'OTHER 20 DEPARTMENTS HERE'}>} amount)

I still would like the same G/L Account No's but just reflecting all the other departments CAD and EAD are slightly different, hence why I have separtated them

Thanks Torbjörn

Not applicable

Having a NOT criteria in an expression

Hi,
If it's that many I woould probably flag them in an Excel-file with 1 or 0. And then use
sum({<[G/L Account No]={'10130', '10045', '10040', '10020', '10110'}, Flag={'1'}>} amount) for example...

/@Ungvall

Not applicable

Re: Having a NOT criteria in an expression

Check this below one.

sum({<[G/L Account No]={'10130', '10045', '10040', '10020', '10110'},Department-={'CAD','EAD'}>}amount)

EDIT:Working example of  not equal to with set analysis is attached.

- Sridhar

frank_carlsson
New Contributor II

Re: Having a NOT criteria in an expression

Hi,

Have you tried

sum({$<[G/L Account No]={'10130', '10045', '10040', '10020', '10110'}, Department-={'CAD','EAD'}>} amount)

(notice the minus sign efter "Department")

Not applicable

Re: Having a NOT criteria in an expression

Perfect adding the Minus worked perfectly.

Thank very much for all your help

Frank Carlsson, Sridhar Ethiraj and Torbjörn Ungvall