Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
waffensmith
Partner - Contributor II
Partner - Contributor II

GetObjectDimension in Range Expression

Can anyone confirm if GetObjectDimension works in a Bar Chart Range Expression? 

I have a dimension and an alternative dimension defined for a bar chart and I am trying to set the chart's max range based on the dimension selected in the toggle in the chart. But it seems no matter which dimension I select,the value never changes. Here is a simplified example of the formula in the Appearance->Range->Custom->Max expression:

=If(GetObjectDimension() = 'Hospital', 2, 1)

But you can see from the image, that the max range is still 1.

waffensmith_0-1675853554737.png

 

I've tried this with different variations of GetObjectDimension and GetObjectField and nothing seems to work. Online help states, "You cannot use this function in a chart in the following locations: title, subtitle, footer, reference line expression" but says nothing about "Range" not being supported. 

Any help would be greatly appreciated. 

I am running Qlik Sense Server 14.54.5 (February 2022 Patch 2)

Labels (1)
2 Replies
jbhappysocks
Creator II
Creator II

Hi! I don't think it's possible, I'm sure someone who knows will let us know soon.

But I have unsuccessfully tried the same and I ended up using a workaround. I thought I'd share it, even if it's not really answering your actual question.

Instead of adding all possible dimensions I used a variable like this, and had the user change dimension in a variable input dropdown instead, and used the variable for adjusting the range

jbhappysocks_0-1675857807723.png

jbhappysocks_1-1675857915470.png

 

 

 

waffensmith
Partner - Contributor II
Partner - Contributor II
Author

Appreciate the response and alternative suggestion. Your suggestion will not work in our application because we are running out of real estate, so another "filter" just doesn't quite fit on our sheet. Hopefully Qlik will respond or implement a fix.