Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
uacg0009
Partner - Specialist
Partner - Specialist

How to calculate the invert selection of a current selection

Hi all,

I have data below:

InvertSelection.png

And I also have a list of ITEM, and what I want to calculate is :

If I choose B and C, I want to calculate what other ITEM the ID who buy ITEM B and C buy?

In this example, it should output

1 A 2

2 D 1

Do you have any ideas?

Thank you!

1 Solution

Accepted Solutions
bruno_m_santos
Partner - Creator
Partner - Creator

Try

sum( {$<ITEM = ITEM >} QTY )  Current Selections

sum( {$<ITEM =- ITEM >} QTY )  Exclude Current Selections

Thanks

Bruno

View solution in original post

3 Replies
vikasmahajan

Try this approach

Start with a blank table | QlikCommunity

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
vikasmahajan

There could be 2 ways to solve your problem:

1. Show/Hide the table chart based on the current selection count (you can use GetFieldSelections to find that)

2. Have a calculated dimension based on GetFieldSelections, which would return a NULL when no selections are made, and 'Suppress when Value is Null' option selected for the dimension

Please go through 2 approach.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
bruno_m_santos
Partner - Creator
Partner - Creator

Try

sum( {$<ITEM = ITEM >} QTY )  Current Selections

sum( {$<ITEM =- ITEM >} QTY )  Exclude Current Selections

Thanks

Bruno