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: 
crichter14
Creator II
Creator II

help with AVG AGGR Count, Set Analysis and ignoring a Filter

Qlik Sense options only.  I'm not attempting this in Qlik View.

I have an average I am calculating, basically the # of store interactions per country.   And I really like the results, I've gotten in the Expression:

AVG(AGGR(COUNT({<STORE_INTERACTION_TYPE={'TOUCHPOINT'}>}DISTINCT STORE_INTERACTION_KEY), SALESPERSON, COUNTRY_CODE))

 

However, the calculation is based on the SALESPERSON field and I want this calculation to IGNORE the SALESPERSON filter.  Can I set this equation to ignore changes to SALESPERSON?

Any suggestions appreciated, we don't have alternative states yet, so I don't think that's an option for us.  (we're so close...a few versions behind!)

 

Thanks

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

May be you need this

Avg({<SALESPERSON>}Aggr(Count({<STORE_INTERACTION_TYPE = {'TOUCHPOINT'}, SALESPERSON>} DISTINCT STORE_INTERACTION_KEY), SALESPERSON, COUNTRY_CODE))

View solution in original post

6 Replies
zzyjordan
Creator II
Creator II

Have you tried
AVG(AGGR(COUNT({<STORE_INTERACTION_TYPE={'TOUCHPOINT'},SALESPERSON=>}DISTINCT STORE_INTERACTION_KEY), SALESPERSON, COUNTRY_CODE))

ZZ
sunny_talwar

May be you need this

Avg({<SALESPERSON>}Aggr(Count({<STORE_INTERACTION_TYPE = {'TOUCHPOINT'}, SALESPERSON>} DISTINCT STORE_INTERACTION_KEY), SALESPERSON, COUNTRY_CODE))
crichter14
Creator II
Creator II
Author

Thank you Zzjordan, but this did not appear to ignore the filter.  However, the other response did work, yay!

thank you again for taking a look.

crichter14
Creator II
Creator II
Author

This worked great, than you Sunny!  One last piece, if I wanted to round the average result...where would the ROUND syntax go?  I'm toying with this now.

crichter14
Creator II
Creator II
Author

Nevermind, dumb question, I found the setting under number format...thank you again.
VivenReddy
Partner - Creator
Partner - Creator

I think you made a mistake by marking your response as the solution instead of Sunny's response.