Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Bar Chart: Show different reference line according to selected dimension

Hello everyone,

is it possible to change the value of a reference line in a bar chart according to the selected dimension?

I was looking for something like a formular for the reference line, i.e.

if(selectedDimension = Category, 2000, if(selectedDimension = Country, 4000, 0)

Right now, I have naively "solved" this with two reference lines, but obviously this is a bad solution.

QlikSense.PNG

Any ideas for a solution would be nice.

Thank you

1 Solution

Accepted Solutions
mikaelsc
Specialist
Specialist

indeed missing function to work with alternative dimensions/measures.

may i suggest use the "qs variable" extension:

create a variable containing your dimension name, and use that variable as dimension and as parameter in your reference line

vDimension = 'CategoryName' or 'Country' (toggle with a button in the extension)

ref line : if($(vDimension)='Country',..., ... )

View solution in original post

1 Reply
mikaelsc
Specialist
Specialist

indeed missing function to work with alternative dimensions/measures.

may i suggest use the "qs variable" extension:

create a variable containing your dimension name, and use that variable as dimension and as parameter in your reference line

vDimension = 'CategoryName' or 'Country' (toggle with a button in the extension)

ref line : if($(vDimension)='Country',..., ... )