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

1 Solution

Accepted Solutions
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))

View solution in original post

25 Replies
its_anandrjs

Please elaborate more in chart you want this or in table load .

Not applicable
Author

Use set.

e.g. if u want to get the count of production_item ignoring the selecting it is something like,

count({<production_year=>}production_item)

Nicole-Smith

You can use E() in the set analysis in your expression.

Example:

=sum({<production_year=E(production_year)>}Value)

Anonymous
Not applicable
Author

If what you want is to not show the grey items in the list box, you cam check "Hide Excluded" in its properties.

jagan
Luminary Alumni
Luminary Alumni

Hi Bhawna,

If you Year= in excludes/doesn't considers the selection of the Year field

count({<production_year=>}production_item)


or


count({<production_year={'*'}>}production_item)


Hope this what you expect, if you are not expecting this come up with a sample and expected results.


Regards,

Jagan.

Not applicable
Author

Thanks to everyone for replying,but I didnt get the actual solution,

I have to show only those Production Item of that year which is not selected,means as I have selected 2008 and 2009,

then the chart must show production item of year 2010 and 2011,please help me out this

Not applicable
Author

I used the sample table u provided and came up with this

=Only({<production_year={'*'}-{$(=GetFieldSelections(production_year))}>}production_item)

This should give you an idea of how to omit the selection and give the rest.

Please let me know.

Not applicable
Author

What will GetFieldSelections() function do?

and this script doesnt show any result,no data is display.

Not applicable
Author

it brings back the selected value of the field you specified. In this case it is production_year.I attached the sample that I used below.