Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
dtbit123
Partner - Contributor III
Partner - Contributor III

Compare to average

Hi

To explain my question 

Ill write in a wrong 

Way and please correct me. 

Avg(if(day_ssupplied

< avg(day_ssupplied),

day_ssupplied))

I want to used that

Expression as master item

So the inner avg should be flexible to any dimension it will stand with.

I tried aggr but it's not flexible with dimension. 

 

Thank

Dt

 

 

1 Solution

Accepted Solutions
Vegar
MVP
MVP

You could try to use aggr(), but instead of aggregating on a fixed dimension you can fetch it dynamically based on which alternative dimension you are using. 

I think the correct  function to use is GetObjectField() or GetObjectDimension() . Like this.

Aggr(avg(...), [$(=GetObjectField(0))])

View solution in original post

1 Reply
Vegar
MVP
MVP

You could try to use aggr(), but instead of aggregating on a fixed dimension you can fetch it dynamically based on which alternative dimension you are using. 

I think the correct  function to use is GetObjectField() or GetObjectDimension() . Like this.

Aggr(avg(...), [$(=GetObjectField(0))])