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

Expression error

What's wrong with the below error? Cannot seem to correct the error.

=avg(aggr(AVG(if(ASSIGNED_STATUS = 'NEWLY ASSIGNED MEMBER' AND TEN_PERCENT_FST_CNT <> ('1','2','19','20'),Avg_FIRST_CONTACT_WK_DAYS)), PROGRAM, DIVISION, REGION))

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

May be this?

=avg(aggr(AVG(if(ASSIGNED_STATUS = 'NEWLY ASSIGNED MEMBER' AND NOT Match(TEN_PERCENT_FST_CNT, '1','2','19','20'), Avg_FIRST_CONTACT_WK_DAYS)), PROGRAM, DIVISION, REGION))

Or Extending Wallo's expr: Need to close the set analysis.

avg(

        aggr(

                   AVG( {<

                                  ASSIGNED_STATUS = {'NEWLY ASSIGNED MEMBER' }, TEN_PERCENT_FST_CNT = {'*} - {'1','2','19','20'}

                             >}  Avg_FIRST_CONTACT_WK_DAYS

                           )

                         , PROGRAM, DIVISION, REGION

                 )

       )

View solution in original post

7 Replies
m_woolf
Master II
Master II

I'm pretty sure this statement doesn't work:

TEN_PERCENT_FST_CNT <> ('1','2','19','20')



Anonymous
Not applicable
Author

Right. How can I fix this?

Anonymous
Not applicable
Author

try 

TEN_PERCENT_FST_CNT-= ('1','2','19','20')

Anonymous
Not applicable
Author

That's not it

Anonymous
Not applicable
Author

avg(aggr(AVG({<ASSIGNED_STATUS = {'NEWLY ASSIGNED MEMBER' },TEN_PERCENT_FST_CNT -={'1','2','19','20'},Avg_FIRST_CONTACT_WK_DAYS)), PROGRAM, DIVISION, REGION)


or

avg(aggr(AVG({<ASSIGNED_STATUS = {'NEWLY ASSIGNED MEMBER' },TEN_PERCENT_FST_CNT ={'*}-{'1','2','19','20'},Avg_FIRST_CONTACT_WK_DAYS)), PROGRAM, DIVISION, REGION)


vishsaggi
Champion III
Champion III

May be this?

=avg(aggr(AVG(if(ASSIGNED_STATUS = 'NEWLY ASSIGNED MEMBER' AND NOT Match(TEN_PERCENT_FST_CNT, '1','2','19','20'), Avg_FIRST_CONTACT_WK_DAYS)), PROGRAM, DIVISION, REGION))

Or Extending Wallo's expr: Need to close the set analysis.

avg(

        aggr(

                   AVG( {<

                                  ASSIGNED_STATUS = {'NEWLY ASSIGNED MEMBER' }, TEN_PERCENT_FST_CNT = {'*} - {'1','2','19','20'}

                             >}  Avg_FIRST_CONTACT_WK_DAYS

                           )

                         , PROGRAM, DIVISION, REGION

                 )

       )

Anonymous
Not applicable
Author

Thanks for catching that.  I missed putting in the closing tags.  Sorry OP!