Announcements
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
cancel
Showing results for
Did you mean:
Partner - Creator

## Need Set Analysis Explanation

Hi all,

I need a clarification on set analysis.

What is the difference between the below two sets?

Sum({\$<Item-={"B"}>}Amount)

Sum({\$<Item={'*'}-{"B"}>}Amount)

Regards,

Dineshraj

1 Solution

Accepted Solutions
MVP

Let's say you data looks like this

Item     Amount

A          50

B          40

Without selection, both the expression will show the same result, i.e. 50. But, the difference comes when you start making selections. For example, let's say you select Item B, Expression 1 in that case will show 0, whereas Expression 2 will continue to show 50. So, in essence, the minus sign before equal continues to honor your selections (and sort of works like an if statement), but the minus sign after = or after {'*'} will disregard all selections made in Item field.

3 Replies
MVP

Let's say you data looks like this

Item     Amount

A          50

B          40

Without selection, both the expression will show the same result, i.e. 50. But, the difference comes when you start making selections. For example, let's say you select Item B, Expression 1 in that case will show 0, whereas Expression 2 will continue to show 50. So, in essence, the minus sign before equal continues to honor your selections (and sort of works like an if statement), but the minus sign after = or after {'*'} will disregard all selections made in Item field.

Creator III

The former means taking the current selection, then deselect "B" in field Item.

The latter means selecting everything in field Item (regardless of current selection) except for "B".

Partner - Creator
Author

Hi Sunny,