Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

Set Analysis not equal to Syntax

I am trying to use Set Analysis for a not equal to value.

=Sum({$<[Flag]-={'x'}>}[Amount])

This is not working properly.  When I change -= to just = , I get the correct amount for the ones that should be equal to x.  How should I write this to sum the Amount where the Flag is not equal to x?

26 Replies
antoniotiman
Master III
Master III

May be

Sum(If(Len(Trim(Flag))=0,Amount)

Not applicable

=Sum({$<[Flag]= e({1<id={'X'}>})>}[Amount])

try this

Not applicable

corrected one

try this please

=Sum({$<[Flag]= e({1<[Flag]={'X'}>})>}[Amount])

soloeeeoff
Contributor III
Contributor III

Am I right ?

=Sum( {1- $<[Flag]={'x'}> } [Amount] )

tamilarasu
Champion
Champion

Hi Cliff,

May be try,

=Sum({$<Flag ={'*'}-{'x'}>}[Amount])

lyeynant
Contributor II
Contributor II

Hi , you need to change from  " -= "    to   " =- " and it will work.


=Sum({$<[Flag]=-{'x'}>}[Amount])

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Indeed, it all depends on what should be the initial selection:

  • Flag -= {'x'}  Current selection minus those rows with Flag = x
  • Flag =- {'x'}  All rows with flag values (including those not selected), excluding those with Flag = x.

Set Analysis not equal to syntax thread234731.jpg

However, from the OP we cannot deduce in detail what is the initial situation...