Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
havha
Contributor
Contributor

Show/Hide columns in table based on filter pane selection

I searched the forum but couldn't exactly find what i'm looking for.

I've a dashboard with lots of KPI's and filter on each KPI (filled/Not Filled)

Beneath a table. I now want to show:

  • Some standard fields such as ID and Name
  • Only the column when in the filter (connected to the KPI) "Not Filled" is selected.

So for instance when the filter next to "Date of Creation" is set to "Not Filled" i want to appear the column "Date of Creation" in the table below. When nothing is selected or "Filled" is selected i don't want the column "Date of Creation" to be shown.

See attached screenprint

Labels (3)
1 Solution

Accepted Solutions
lorenzoconforti
Specialist II
Specialist II

You need to do a couple of things then

Firstly, you need to change your filter; as it is set up now, you are not directly making a selection on Date of Creation. Re-write it as follows:

=aggr(IF([Date of Creation] ='', 'Not Filled', 'Filled'),[Date of Creation])

Then, in the column condition in your table, write the formula I gave you before:

=if(GetFieldSelections([Date of Creation]) = '',1,0)

View solution in original post

12 Replies
lorenzoconforti
Specialist II
Specialist II

In your table, under the column "Date of Creation", in the section "Show Column if", try writing this:

 

 =if(GetFieldSelections(Filter) = 'Not Filled',1,0)

havha
Contributor
Contributor
Author

Thought of that allready but "Filter" is not a fieldname and I get the error invalid fieldname. All filters have the same name "Filter". Inside the Filter f.i. this expression is used: =IF([Date of Creation] <> '', 'Filled', 'Not Filled')

lorenzoconforti
Specialist II
Specialist II

Then do it on Date of creation

 

 =if(GetFieldSelections([Date of Creation]) = '',1,0)

havha
Contributor
Contributor
Author

Unfortuantely that's not what i mean.

I only want to show the column if the selection pane is used and set to "Not Filled"

In your solution the column is hidden based on the KPI-view.

lorenzoconforti
Specialist II
Specialist II

You need to do a couple of things then

Firstly, you need to change your filter; as it is set up now, you are not directly making a selection on Date of Creation. Re-write it as follows:

=aggr(IF([Date of Creation] ='', 'Not Filled', 'Filled'),[Date of Creation])

Then, in the column condition in your table, write the formula I gave you before:

=if(GetFieldSelections([Date of Creation]) = '',1,0)

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Try

In Date Creation column look for Show If and enter

=NOT GETFIELDSELECTIONS(Filter)='Not Filled'

Hope this helps

havha
Contributor
Contributor
Author

Thanks Lorenzoconforti. Will give it a try

 

havha
Contributor
Contributor
Author

Thanks Gabriel but as 'Filter' is not a field name this doesn't work.

lorenzoconforti
Specialist II
Specialist II

Let me know how it goes

The other option would be to set up a variable and a button with actions

The variable would determine whether or not to show the column

The button would have two actions assigned to it: change the value of the variable (to show/hide the column) and set field selection (to filter the data)