Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

cliff_clayman
New Contributor III

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

Re: Set Analysis not equal to Syntax

May be this:

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

agni_gold
Valued Contributor

Re: Set Analysis not equal to Syntax

Try with out $ ,

As it is looking fine , can you post your sample app so that i can help easily.

cliff_clayman
New Contributor III

Re: Set Analysis not equal to Syntax

Sunny,

That expression just returns $0.

Agnivesh,

Taking out the $ also gives me $0.

I am essentially trying to replace this expression with Set Analysis:

=Sum(If([Flag]<>'x',[Amount]))

Re: Set Analysis not equal to Syntax

Is there a sample you can share?

cliff_clayman
New Contributor III

Re: Set Analysis not equal to Syntax

Not really as you have seen before, the file is quite large and I cannot just parse out the relevant data.

nagarjuna_kotha
Valued Contributor II

Re: Set Analysis not equal to Syntax

You can also try like below:

Exmple:   Sum( {<Year -= {2016}>} Sales)

I hope thi may helps you.

-Nagarjun

rupamjyotidas
Valued Contributor

Re: Set Analysis not equal to Syntax

What does If([Flag]<>'x' returns, it is NULL or you have a value for it like Flag<>'x' is 'Y','Z' etc, as NULL would be a problem in Set Analysis

stig1984
Contributor

Re: Set Analysis not equal to Syntax

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

cliff_clayman
New Contributor III

Re: Set Analysis not equal to Syntax

I have tried that as well and it produces a value of $0.

Community Browser