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: 
Anonymous
Not applicable

Exclude Column in nested statement

Hi All,

The below expression should ignore the field organization. I am trying to ignore the field organization, but i am getting this error.

Error: Error in expression:

Nested aggregation not allowed

= avg( aggr (Avg(  if( Year_Flag >0 ,

Aggr(FirstSortedValue({<Year={'>=$(=max(Year)-2)<=$(=max(.Year))'}>}Value, -Date),

Year_Org))),Value))

Thanks in advance

2 Replies
sunny_talwar

Where in your expression you think you are ignoring the field organization?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps like this:

= avg({<organization=>}

     aggr(

        Avg({<organization=>}

            if(Only({<organization=>}Year_Flag) >0

                ,Aggr(

                     FirstSortedValue({<organization=,Year={'>=$(=max({<organization=>}Year)-2)<=$(=max({<organization=>} Year))'}>}Value, -Date)

                     ,Year_Org

                 )

             )

        ),

    Value)

)


talk is cheap, supply exceeds demand