QlikView: Quick tip #1 - Show/hide elements using text objects

Sometimes, we have a lot of objects related that we want to keep in the same sheet. Containers can be an option to avoid crowded visualizations. They are easy to use, you can group and hide and display objects, but when it comes to style, you don't have too many options to play with. Instead, we can use text objects along with variables to display or not objects. In this quick tutorial, I explain how to do it.
Let's start by creating a variable called "vShowTab" and set "Tab 1" as our default value


Next, add a text object.  In the properties menu go to Actions and select Add --> Action type: External --> Action: Set Variable. In the variable name type "vShowTab", and Value "Tab 1".


In this example, we have added two additional text objects, and enable a Set Variable action for each of them, but assigning a different values (Tab 2, Tab 3).

Once the text objects and actions have been configured, set the conditions to hide/show object based on the text element selected. To do so, go to Layout tab and the following condition:


This condition indicates Qlik to hide the current object when the variable has a value equal to "Tab 1". This will happen when we click the Text Object that we configured at the beginning. Repeat this step every time you need to hide/show and object based on the value of vShowTab variable.

You can download the file with this example here.

No comments:

Post a Comment