# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for
Did you mean:
Not applicable

## Set analysis: exclude two or more of conditions

I have to exclude from all range of possible values combination of two in measure. Basically I need to sum all but year 2016 and month 5 and Total for field Amount should be 9.

I need solution with set analysis as in real data there are much more combinations and more conditions.

For example:

YearMonthAmount

2015

51
20165

2

2015

4

3
201675

at the moment tried something like this but it doesn't help

Sum({-<Month={5}>*<Year={2016}>} Amount)

Sum({\$-<Month={5}>*<Year={2016}>} Amount)

Sum({\$}-{<Month={5}>*<Year={2016}>} Amount)

Sum(-{<Month={5}>*<Year={2016}>} Amount)

So the question is really about syntax.

1 Solution

Accepted Solutions
MVP

Both of them seems to be working in Qlik Sense also

10 Replies
MVP

May be just this

=Sum({\$-<Month = {5}, Year = {2016}>} Amount)

MVP

Or this

=Sum({-(<Month={5}>*<Year={2016}>)} Amount)

Creator

Hi Sunny,

I tried the above logic with the sample Qlikview Data. But it is not working and i donot know why. Attached Excel and QLikview app for your reference. I am using Personalized edition and only in office we used licensed. So , i cannot open the changes that u make in attached Qlikview. Kindly share the expression in the comment itself. !Sorry to trouble u ..@

Contributor III

Try this:

Sum({(<Month-={5}, Year-={2016}>)} Amount)

Creator

No luck for me Padmaja, some how it is not working and i donot know the actual reason.

=sum({(<[Purchase month]-={2}>)}[Sales Value]) . not working !!!!

MVP

For the sample data provided, it seems to work well

Not applicable
Author

Non of these helps. Probably you test it in Qlik View and I use Qlik Sense.

All responses tested - not working.

MVP

Both of them seems to be working in Qlik Sense also

Not applicable
Author

Thank you! I will do further investigations. On simple data it works and I see that syntax is right. By some reason on my actual data it doesn't work.

Tags
Community Browser