Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

show dimension values based on condition

Hi All,

  Please find the below table.Country dimension as list box if i selected ALL ,in the pivot table i want to show all countries except ALL  otherwise it should show selected country.

countrySales
ALL40
IND20
USA10
UK10
1 Reply
felipedl
Partner - Specialist III
Partner - Specialist III

Hi,

Create a variable with the following:

=if(only(country)='ALL','{<country=e(country)>}','{<country=P(country)>}')

And as an expression, use:

sum($(vSetAnalysis)Sales)

With this set, when you select ALL, it gets the excluded values for the country filter (getting all values besides the 'ALL' value) and when selecting anything else, it gets the possible values.

Pictures for reference:

1. Variable creation

sample.png

2. Expression:

sample2.png

Felipe.