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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Shubham_D
Partner - Creator
Partner - Creator

Different dimension columns in Bar Chart on the basis of variable value

Hi,
I want to change dimension column in BAR Chart on click of button in QlikSense.
So I am setting variable value on click of button according to that I want to use 2 different columns as Dimension,

Dimension:
If(vVariable1='Column1', ABC,
if(vVariable1='Column2', XYZ))

But its not working, any suggestion ? 

Note : I cannot use alternate dimensions here.

Labels (3)
1 Solution

Accepted Solutions
ramchalla
Creator II
Creator II

@Shubham_D you need to specify the $ before the variable to work fine.

If($(vVariable1)='Column1', ABC,
if($(vVariable1)='Column2', XYZ))

View solution in original post

2 Replies
ramchalla
Creator II
Creator II

@Shubham_D you need to specify the $ before the variable to work fine.

If($(vVariable1)='Column1', ABC,
if($(vVariable1)='Column2', XYZ))

Shubham_D
Partner - Creator
Partner - Creator
Author

Hi Ramchalla,

It worked. Thanks !!
Just a small change as it worked with Single quotes,

If('$(vVariable1)'='Column1', ABC,
if('$(vVariable1)'='Column2', XYZ))