Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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 (4)
1 Solution

Accepted Solutions
ramchalla
Creator
Creator

@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
Creator

@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))