
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
