Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis To exclude an item

 

Hello!  What's wrong with my formula ...I need to sum all the Total Value of the field Item NO but to exlcude item '5126'...but seems the <> doesn't work...

= sum({$<ItemNO<>{'5126'}>}[Total Value])

I  really appreciate if you could help me with this problem...I'm still a newbie in Qlikview.

Tks.

29 Replies
Not applicable
Author

Hi

I am new to QlikView so this could be wrong..

Does this do what you need?

=Sum({$-<ItemNO={'5126'}>}[Total Value])

If it does; the important part of the formula is the minus symbol after the $ dollar sign (a Modifier).  I also think the greater/less than combo fail as they look like the set analysis brackets.

I hope this helps.

Oli

Eugeny_Ilyin
Creator II
Creator II

Hello,

Try use -= instead of <>

= sum({$<ItemNO-={'5126'}>}[Total Value])

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

= sum({$<ItemNO-={'5126'}>} [Total Value])

-= should be used to exclude the items, qlikview will show error near -=, but works as expected.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi,

You can replace the <> with -= like this:

Sum({$<ItemNO -= {'5126'}>} [Total Value]) //can be also {$<ItemNO = ItemNO - {'5126'}>}

Hope this helps.

johnca
Specialist
Specialist

Try this;

Sum ({$<ItemNO-={5126}>} [Total Value])

or

Sum ({$<ItemNO-={'5126'}>} [Total Value])

Note the minus-equal signs for does not equal.

datanibbler
Champion
Champion

Hi,

I am a newbie myself - and, to be honest, I'm not familiar with the syntax as you use it yet - but wouldn't it work if you turn it "inside out", writing

IF(ItemNO<>5126,sum([Total Value])

?

(I don't think you need to enclose a number in quotes, that's only for STRINGs)

HTH

Regards,

DataNibbler

eddysanchez
Partner - Creator
Partner - Creator

sum({$<ItemNO={">5126<5126"}>}[Total Value])

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi

Try this

= sum({$<ItemNO ={"*"}-{5126}>}[Total Value])

Let me know if it works.

Best Regards,

Gabriel

Anonymous
Not applicable
Author

Thanks everyone for your contributions ... I couldn't imagine there are actually no of ways to solve my problem .... Using =- or -=  instead of <> actually works though it gives me  red error lines.  Thus, I'm confident to use below formula...

=sum({$<ItemNO = {*}-{5126}>}[Total Value])

=Sum({$-<ItemNO={'5126'}>}[Total Value])

=sum({$<ItemNO = ITEMNO -{5126}>}[Total Value])

I wish I could flag more  correct answers 🙂

fabio182
Creator II
Creator II

Thanks man