1 Reply Latest reply: Sep 6, 2013 12:25 AM by Tresesco B

# How to exclude values only when a specific condition is true?

Hello and thank you for taking your time to help me with my question, the thing is that I have the following scenario, let me show you the table example first:

 Product Year month bt Frooty loops 0 0 1 Oranges 2013 7 0 Oranges 0 0 1 Pinapples 2013 7 0 Apples 2013 7 0 Apples 0 0 1

The first question is should I do something like this?

sum({<Month={\$(SelectedMonth)},bt = 0> }Product} I wanna do something like this so that I show the selected month-year and the ones that don't have a month or year which are the ones where "bt" = 1

That's just part of the problem, the second problem is how do I tell qlik view that if a product is repating like oranges for examples, only show me the one where year and month is different than 0 (note: this is just in case the product is repeating otherwise I would show it), I hope someone can understand and help me with this,, if you have any questions just tell me thanks in advance

• ###### Re: How to exclude values only when a specific condition is true?

To answer your first question, SelectedMonth is not required to be included in the set, because qv calculates on selected data unless told(in set analysis) otherwise, therefore i guess sum({<bt ={0}> }Product) should work.

For second problem, use count() function to check if it is repeating, like If(Count(Product)>1,...,...). This logic you can try to implement in set as well.