Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
crichter14
Creator
Creator

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
Creator
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
Creator
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
Creator
Author

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

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