Qlik Community

Qlik Sense Enterprise Documents

Documents for Qlik Sense related information.

Conditional Show/Hide in Qlik Sense

amijit_hazarika
New Contributor III

Conditional Show/Hide in Qlik Sense

Hello Qlik Enthusiasts,

While developing a dashboard in Qlik Sense, I came across a requirement which says that a particular table or columns of that table should be visible only after a selection is made on a different object.

Example: A table consists of 20 dimensions and measures. When a user comes to that sheet, he should only see 5 columns from that table. There is a drop down object beside which shows the name of the remaining 15 dimensions/measures. When a user selects any of those 15, then that particular dimension/measure should show up in that table where it was hidden.

This was not possible in Qlik Sense. But can be done with the help of an extension.

I would like to share how I was able to meet this requirement using an extension.

One can download Vizlib extensions and can fulfill this requirement. Instead of a normal QS table, I used Vizlib table and for drop down I used a Vizlib Filter Pane.

Create an island table in the script and name the table as the name of the header you want to keep for the Vizlib filter pane. You may change the header name later on too. Bring all the field names you want the user to choose from the filter pane and store them in the island table. Once you reload the data, you can use the filter pane to pull in the field names. You may select Listbox, Dropdown or Buttongroup to show the fields in the filter pane. I always prefer Dropdown.

Once you have pulled in the Vizlib filter pane, you may now go ahead brining the Vizlib Table. Pull all the dimensions and measures you want. For each dimension/measure, there is an option called Calculation condition. In the calculation condition, you may describe your show/hide condition.

For my requirement, I have used the below expression to execute this scenario;

If(GetSelectedCount(FieldName)>0,1,0)

This would pop up the column in the Vizlib table once that column’s field name has been selected from the Vizlib filter pane.

I hope that this might be useful to someone working on Conditional hide/show in Qlik Sense and also this would help in improving the performance of the sheet while getting loaded.



Thanks

Amijit Hazarika

Comments
MVP
MVP

This is a function that was there out of the box in QlikView.  It's worth noting that the VizLib extension library has a number of objects that "plug the gaps" between was was available in QlikView and what is currently available in Sense.  The Advanced Text Object is another great example of this.

If you want to know more I am sure that mahlerma‌ will be happy to enlighten.

simondachstr
Valued Contributor III

Any time! Feel free to post questions here directly - make sure to tag me so I can get a notification

Version history
Revision #:
1 of 1
Last update:
‎04-28-2018 02:46 AM
Updated by: