#4 Using GetObjectDimension() in Qlik Sense
Hi, are you aware of GetObjectDimension() ? I used it not long ago to achieve something really specific in Qlik Sense.
GetObjectDimension() has to be used in expression and send you the value of the actual dimension. Since you can add alternative to almost any chart in Qlik Sense, it can sometimes get you into trouble.
My use case is to get the max income by education field in the bar chart, and the user can switch between Department and Job Role.
My expression is : Max(aggr(max(MonthlyIncome),EducationField,Department))
But it's not working anymore if you switch to JobRole.
I can solve it using GetObjectDimension :
If(GetObjectDimension(0)='Department',
Max(aggr(max(MonthlyIncome),EducationField,Department)),
Max(aggr(max(MonthlyIncome),EducationField,JobRole))
)
You can Download QVF