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: 
Not applicable

Show Hide column based on a button click.

Hi

I want to show/hide a column in a table based on a button.

My requirement is -

The button Text will be 'Show Customers' and when the user clicks, it should add customers to the table.

Once the column is visible, the button Text should change to 'Hide Customers'. And when the user clicks, it should hide the Customers column.

Is this possible ? Please advise.

Paramita

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Use Straight table and add Customer dimension along with other dimensions.

Create a variable using  Settings Menu -> Variable Overview and create a variable

vShowCustomer=1

Now Create button and

Button Properties -> General -> Text -> Give If(vShowCustomer = 1, 'Hide Customer', 'Show Customer') ->

Actions -> Add-> External -> Set Variable -> Variable = vShowCustomer

Value = =If(vShowCustomer =1, 0, 1)

Now in Straight table Properties -> Click on Customer Dimension -> Select Enable Conditional option and give

=vShowCustomer

Hope this helps you.

Regards,

Jagan.

View solution in original post

4 Replies
Not applicable
Author

Use a variable to do this.

Create a variable say vCust.

Create 2 buttons

1st button

'Show Customers'

On the Action, choose External-> Set Variable -> 1

Goto the layout table and go to conditional and say $(vCust)=0

2nd button

'Hide Customers'

on the action, choose External -> Set Variable -> 0

Goto the layout tab and go to conditional and say $(vCust)=1

in your chart, go to the dimension , click on enable and say $(vCust)=1

jagan
Luminary Alumni
Luminary Alumni

Hi,

Use Straight table and add Customer dimension along with other dimensions.

Create a variable using  Settings Menu -> Variable Overview and create a variable

vShowCustomer=1

Now Create button and

Button Properties -> General -> Text -> Give If(vShowCustomer = 1, 'Hide Customer', 'Show Customer') ->

Actions -> Add-> External -> Set Variable -> Variable = vShowCustomer

Value = =If(vShowCustomer =1, 0, 1)

Now in Straight table Properties -> Click on Customer Dimension -> Select Enable Conditional option and give

=vShowCustomer

Hope this helps you.

Regards,

Jagan.

amit_saini
Master III
Master III

Hi Paramita,

This link may help you:

Re: Re: Button to Show/Hide a Calculated Dimension

Thanks,

AS

Anonymous
Not applicable
Author

See attachment