3 Replies Latest reply: Jun 5, 2014 4:20 PM by Joseph Musekura

# Not equal to in set analysis

I'm interested in creating an expression in qlikview that will calculate the sum of [Current Balance] for all rows where Field1 is not equal to 'H'. For some reason qlikview is not liking any of the not equal operators such as <> or !=. Is there a way around this? Thanks.

• ###### Re: Not equal to in set analysis

Try: sum({<Field 1 -= {'H'}>}[Current Balance])

Set analysis is like making a selection. The '-=' selects all of Field1 except 'H'

• ###### Re: Not equal to in set analysis

Jacob's solution is the most straightforward one.

As a side note, the = in a set modifier should be looked at as an assignment operator ("should be filled with values from the following set") and not as a relational operator ("is equal to?")

On the other hand, if you try to use a 'not equal to' operator inside the explicit set specification (the part between {"..."}), you can use advanced search, like in:

=sum({<Field1 = {"=Field1 <> 'H'"}>} [Current Balance])

After the equal sign inside the explicit set specification, any regular QlikView expression can be used. See Advanced Search in QlikView Help.

• ###### Re: Not equal to in set analysis

Hi,

You can use this as reference as well

http://community.qlik.com/message/12808#12808

Regards,