Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bendixgruschka
Partner - Contributor
Partner - Contributor

GetObjectDimension

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! 

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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:

https://community.qlik.com/t5/Qlik-Sense-App-Development/Using-GetObjectDimension-in-Aggr/td-p/13127...

 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

8 Replies
sunny_talwar

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

GetObjectField

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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:

https://community.qlik.com/t5/Qlik-Sense-App-Development/Using-GetObjectDimension-in-Aggr/td-p/13127...

 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

bendixgruschka
Partner - Contributor
Partner - Contributor
Author

I see. Thank you!

andrew_thomson
Contributor II
Contributor II

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/ 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

GetObjectDImension() is only valid at the chart row level. It is not available on the chart level, where you set min/max ranges. 

-Rob

Vegar
MVP
MVP

Is GetObjectDimension() the same as GetObjectField() or what's the differences?
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think they are the same.  I believe there is some confusion between the documentation and what's implemented. 

oli_hardy
Partner - Contributor II
Partner - Contributor II

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()))