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
satishkurra
Specialist II
Specialist II

Sum({<Year-=2008>}Sales)

With the above expression it will exceed the 2008

For inclusion use + in place of - in above expression

Thanks

Satish

Not applicable
Author

Another possible solution...

I created a list box using the production_year and a straight table with the following:

Dimension: production_year

Expression: =Only({1-$} DISTINCT production_item)

{1-$} will return results for everything excluded by the current selections

Hope this helps!

Not applicable
Author

But it doesnt work for multiple selection the GetFieldSelections() does not take multiple selection inputs

Not applicable
Author

But if I havent select any value it doesnt display any result.. No data is displaying.

Not applicable
Author

Do you have another selection beside the production year? Then you have to give me the correct sample to help you out here.

Not applicable
Author

Also it does work with multiple selection. You have to include your another selection with comma.

e.g.: =Only({<production_year={'*'}-{$(=GetFieldSelections(production_year))},t={'*'}-{$(=GetFieldSelections(t))}>}production_item)

Please check the attached.

Not applicable
Author

No I have only two Fields,one

Not applicable
Author

I really did not understand what your requirements are . Can you please post your sample file and state your needS?

Not applicable
Author

That means as the number of selection increases I have to add GetFiealdSelection() for each?

Not applicable
Author

Here is an example of how you might handle that:

=if(isnull(GetFieldSelections(production_year))<>-1,Only({1-$} DISTINCT production_item), Only({$} DISTINCT production_item))