Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dineshraj
Partner - Creator
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)

Please Explain this

Thanks in advance.

Regards,

Dineshraj

1 Solution

Accepted Solutions
sunny_talwar

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.

View solution in original post

3 Replies
sunny_talwar

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.

vunguyenq89
Creator III
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".

dineshraj
Partner - Creator
Partner - Creator
Author

Hi Sunny,

     Thank you for your Explanation.

Regards,

Dineshraj