Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

To display a particular column based on filter selection in grid

Hi,

Consider I have the following list box and grid chart(Straight Table),

ListBox1:

Clients
A
B

ListBox2:

Country
USA
India

Grid:

Client NameCountry
AUSA
BIndia

Now if I select Client in the list box,the grid should only show the Client Name column in the grid and others should not be shown. So based on the filters selection I want the grid columns to be shown. And also by default I want to show all the columns in the grid and only if I select a filter, I want the grid(Straight Table) to be displayed based on the filter(listbox) selection. I don't want to show based on hide/show option.

9 Replies
Digvijay_Singh

Use these condition in Dimension enable condition -

GetSelectedCount([Clients])=1 or  GetSelectedCount(Country)=0

GetSelectedCount(Country)=1 or GetSelectedCount([Client])=0

Digvijay_Singh

Use '>=1' to handle multiple selections in above expressions

ziadm
Specialist
Specialist

if you have the right data model then the Qlik by default will filter the associated data only.  This is called associative experience.

The Associative Experience - Revisited

Not applicable
Author

It works in case of 2 columns and filters but in actual data I have more than 10 columns

Not applicable
Author

Yup I knew Qlik is associative in nature but here my question is to display only the columns that is selected in list box. For e.g. If I select Country USA from List box, I just want Country column to be displayed in grid by excluding Client Name.

Digvijay_Singh

The solution is simple, it appear long, you just need to add the rest of the dimensions as below -

GetSelectedCount([Clients])>=1 or  (GetSelectedCount(Country)=0 and GetSelectedCount(Region) = 0)

Not applicable
Author

Ya thank you. It worked..

Digvijay_Singh

Good. You can close this thread by marking appropriate answer correct or can post new questions.

Matt
Contributor III
Contributor III

Hello Digvijay, I have same problem. My table contains dimensions and expressions as columns. For example dimensions Bank, manager, contract_type, contract_category, year and expressions total_contracts, contract_y_2018, contract_y_2019.

If I select Bank = 'ABC' and year = '2019' I want to display all dimensions and expressions only total_contracts, contract_y_2019

Could you help me, please?