Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
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

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