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

Toggle between 2 Categories

I have 6 dimensions, which can be split into two categories.

Category A: Company_A_Location1, Company_A_Location2, Company_A_Location3

Category B. Company_B_Location1, Company_B_Location2, Company_B_Location3

I want to be able to select either A or B, by creating a variable or through some other means, and have the corresponding Category dimensions showing in the listboxes and tables on the sheet.

6 Replies
sunny_talwar

Would you be able to provide a sample application or Excel file to look at the exact structure of your data?

Best,

S

avinashelite

try to split the columns in the script and create a inline field for the category toggle.

If your facing any issue please provide the sample data.

Anonymous
Not applicable
Author

You could create a couple of bookmarks for your 2 selection states.

Or have Triggers on Button or Text objects that do selections when they are clicked.

linusblomberg
Creator II
Creator II

Sure, you can do this in so many ways with variables.

Start with a button to change the variable vCompanyCategory

You can do a calculated dimension where you'd say, if(vCompanyCategory='A', Company_A_Location1,Company_B_Location1)

or you could do 3 dim variables

vCompanyLocation1

vCompanyLocation2

vCompanyLocation3


defined in the same way: if(vCompanyCategory='A', Company_A_Location1,Company_B_Location1)


What I think is the nicest way though is if you don't do it using variables but work on your data model and create a field with CompanyCategory.


hope this helps

Not applicable
Author

Hi Christopher:

It's a bit cumbersome, but maybe you can use it as a template for what you need.

https://www.dropbox.com/s/sz1m2c2patoyg4u/test.qvw?dl=0

Hope it helps.

Not applicable
Author

Also you can create all 6 listboxes and use Show Conditional from Layout page, with conditions vCompanyCategory='A' or vCompanyCategory='B'.