Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
idogridish2
Creator III
Creator III

Trying to show a reference line - GetObjectDimension(0) not working

Hi,

I a Trying to show a reference line with Aggr, but GetObjectDimension() is not working,

GetObjectField() isn't working as well,

example attached,

Thanks.

Labels (2)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

Hi Ido

Qlik is fully aware to the functionality 

here is what you can find in the help site 

GetObjectField - chart function

GetObjectField() returns the name of the dimension. Index is an optional integer denoting the dimension that should be returned.

Note:

You cannot use this function in a chart in the following locations: title, subtitle, footer, reference line expression.

View solution in original post

4 Replies
sasiparupudi1
Master III
Master III

Hi 

Aggr function expects dimensions not expressions.. $(=GetObjectDimension(0)  will not work

 

Avg(Aggr(Sum(Patients),Month)))

 

Below is from qlik help regarding aggr

Limitations:  

Each dimension in an Aggr() function must be a single field, and cannot be an expression (calculated dimension).

lironbaram
Partner - Master III
Partner - Master III

hi 

another thing is the functions getobjectdimension and getobjectfield  only works in expressions , 

and those not work in the header or referance line for that matter 

you can use a combo chart and add the referance line as an expression 

this expressions will work 

= sum(total Patients)/ count(total distinct $(=GetObjectField(0)))

idogridish2
Creator III
Creator III
Author

Hi Liron,

I wonder why it's not working for reference lines and also Max height of a bar chart and if Qlik are aware of that..

thanks for the advise.

Best Regards,

Ido.

lironbaram
Partner - Master III
Partner - Master III

Hi Ido

Qlik is fully aware to the functionality 

here is what you can find in the help site 

GetObjectField - chart function

GetObjectField() returns the name of the dimension. Index is an optional integer denoting the dimension that should be returned.

Note:

You cannot use this function in a chart in the following locations: title, subtitle, footer, reference line expression.