Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

shows the data exclude from selection

hello everyone,

I have a task where I have to exclude selected data.

for example I have two tables like

production_item   production_year

A                              2011

B                              2010

C                              2008

D                              2009

Now I have to exclude item of selected year like

year.png

thank you in advance

25 Replies
Not applicable
Author

Yes.

Not applicable
Author

Thank you so much Gwen...

If you dont mind,could you please explain me the logic it will very helpful for me..

Not applicable
Author

Even mine is correct answer. I dont understand why mine is not correct. Can you pls explain if you dont mind.

Not applicable
Author

I didnt get the result as I want from ur script,it makes the code bulky,but your script make me to understand what the logic is.. Thank you so much for that.. I really appreciate your effort..

Not applicable
Author

Sure.

IF Statement

1. Test to see if selections (in production_year field) have been made -

     "isnull(GetFieldSelections(production_year))<>-1"

2. If selections HAVE been made, return all products excluded from selections -

     "Only({1-$} DISTINCT production_item)"

3. If selections HAVE NOT been made, return all products -

     "Only({$} DISTINCT production_item))"

**{$} is not required in this 3rd portion of the if statement, but I used it to demonstrate the difference between the sets.

Not applicable
Author

Thank you so much...