Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
christiandekock
Contributor
Contributor

Multi Column dropdown

Hi team,

I have a sheet with four columns: Age, Gender, Ethnicity, Population count. I want to create a grid chart where one has the population count as the dimension and then would like to have a drop down  altering the graph when selecting age, gender or ethnicity. Would appreciate the help.

Regards

Labels (2)
1 Reply
daturpin
Partner - Creator II
Partner - Creator II

1) Create a variable by clicking the icon in the lower left when the assets frame is open. Just name it, it doesn't have to have a function. I'm just naming mine 'variable'

2) Use the "Variable input" object, which sets the value of a variable, and can be made into a dropdown list. Choose your variable as "name", and under values use "Fixed value" and assign the names you want, such as Age, Gender, Ethnicity. I am also assuming that your table columns are called something similar, like [Age], [Gender], [Ethnicity]

3) In the chart, under data, set the dimension with a function. Something like =if(variable='Age', [Age], if(variable='Gender',[Gender], if(variable='Ethnicity',[Ethnicity])))

4) In the same area, set the label to a similar function so it displays the name of the dimension: =if(variable='Age', 'Age', if(variable='Gender','Gender', if(variable='Ethnicity','Ethnicity')))

 

This will require tweaking to your exact case but is generally how to alter the chart by a variable.