Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
richards
Contributor III
Contributor III

Show/Hide columns depending on choice in listbox

In my application i used about 40 measures. 

And in one pivot table i would like to offer the user of the application to show each measure for each occuation. Either one measure or for instace three measure .i .e

I have created a listbox/simple selection box, based on a table that hold the name of the measures.

Name of measure and ID_of_name!

Each row is represented as the name of the measures. 

Now I would like to use the hide/show function on the the pivot table on each measure.

So for instance i tried theese function but it doesn´t work completly. The result has to be that if i choose id 3 it show id 3, and if i choose 4, 8 and 10 it should only show these.

The function i tried on each measures show/hide in properties is the following

=SubStringCount('|' & GetFieldSelections(ID_of_name, '|') & '|', '2') > 0
SubStringCount(ID_of_name,2)
=if( ID_of_name<>'2',0,SubStringCount(Concat(ID_of_name, '|'), '2'))

Anyone have any suggestion on how to defined the show/hide?

It has to be a function that always show one or moore depending on which measure name you use.

Best regards

 

 

 

 

 

1 Solution

Accepted Solutions
richards
Contributor III
Contributor III
Author

Hi !

Thanks for the reply. It gaved me some ideas on how to solve the problem.

My solution was the following.

If you create your own island of name with for instance inline. 

Using the parameterns of MEASURE and MEASURE_ID

Then in the pivot I created the explicit function of 

if(IsNull(GetFieldSelections(MEASURE)),0, SubStringCount(Concat(MEASURE, '|'), 'BUDGET')) in the show/hide.
 
I.e. MEASURE as parameter for the static measure of budget, is only shown if BUDGET is checked in the box. 
This could also work with MEASURE_ID if i change the "BUDGET" to for instance 1.
 

View solution in original post

2 Replies
Gui_Approbato
Creator III
Creator III

Hi Richard,

You can show/hide coluimns using variables in the "Show column if" property.

Inser the desired columns in the table, create the variables and buttons to change the values of those variables. Then you assign in the "Show column if" space in the table:

Variable_qlik_table.png

 

 

 

 

 

 

 

 

 

 

 

Best regards

richards
Contributor III
Contributor III
Author

Hi !

Thanks for the reply. It gaved me some ideas on how to solve the problem.

My solution was the following.

If you create your own island of name with for instance inline. 

Using the parameterns of MEASURE and MEASURE_ID

Then in the pivot I created the explicit function of 

if(IsNull(GetFieldSelections(MEASURE)),0, SubStringCount(Concat(MEASURE, '|'), 'BUDGET')) in the show/hide.
 
I.e. MEASURE as parameter for the static measure of budget, is only shown if BUDGET is checked in the box. 
This could also work with MEASURE_ID if i change the "BUDGET" to for instance 1.