Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
can someone explain to me the purpose of the function "GetObjectDimension". I haven´t found any explanation in the Qlik Help.
Thanks you!
I don't know why it's missing from the Help. GetObjectDimension(n) is used in Qlik Sense to determine which alternate dimension is current. It can be useful when the measure or some other attribute should be conditional based on the current Dim. For example, a measure like:
if(GetObjectDimension(0) = 'Year', sum(Sales), avg(Sales))
A note that this only works at the Chart row level:
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
Where have you seen GetObjectDimension getting used? I know about GetObjectField, but have not heard about GetObjectDimension. If you need info on GetObjectField.... check the link below
I don't know why it's missing from the Help. GetObjectDimension(n) is used in Qlik Sense to determine which alternate dimension is current. It can be useful when the measure or some other attribute should be conditional based on the current Dim. For example, a measure like:
if(GetObjectDimension(0) = 'Year', sum(Sales), avg(Sales))
A note that this only works at the Chart row level:
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
I see. Thank you!
The really odd thing is that this approach works on setting the colours of the dimension, based on the selected Dimension (or Alternative), but not for the min/max ranges for some reason.
e.g.
if(GetObjectDimension() = 'Month',
max(aggr(sum([Customer Agreed Qty]), Month))*1.25,If(GetObjectDimension() = 'Week', max(aggr(sum([Customer Agreed Qty]), Week))*1.25))
Conditional colours example blog:
https://vietqlikies.wordpress.com/2018/11/11/alternative-dimensions-va-measures-trong-qlik-sense/
GetObjectDImension() is only valid at the chart row level. It is not available on the chart level, where you set min/max ranges.
-Rob
I think they are the same. I believe there is some confusion between the documentation and what's implemented.
I know, this post is years old.
But if someone is still looking for some information..
Getobjectfield() returns the underlying field name, wheras getobjectdimension() returns the defined dimension name in the masterelement.
I was looking for a function to place always the right dimension in my measure avg aggr expression by using the alternate dimension functionality.
-> avg(aggr(sum({<_asOfLast4Quarter = {1}>} Sales), [Quarter Year], $(=GetObjectField()))