Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exclude field selections for average

Hello,

I want to calculate the average of units sold (#) for region (Regionaam) and I have three regions; noord, west and Zuid. I want to calculate the average in pivot table but if I select one of the regions, I get the number of units sold for that region and I want to see the average instead. Please help me?!

Thank you

Best,

1 Solution

Accepted Solutions
Not applicable
Author

Thank you Sunny for your help!

I found the right expression I need which is this:

Avg(Aggr(sum({< Regionaam=P(Regionaam),$(v.Actual),$(v.PeriodYear)>}[Units sold]), Regionaam)) I was using LandBestemming instead of Regionaam

View solution in original post

4 Replies
sunny_talwar

Try it with total:

Avg(TOTAL [Units Sold])

Not applicable
Author

thank you for your reply, but I tried that. this is the expression i was using.

AVG(TOTAL<LandBestemming>aggr(sum({1<LandBestemming={'NL'}, $(v.Actual) ,$(v.PeriodYear)>}#),LandBestemming))

sunny_talwar

Would you be able to share a sample?

Best,

Sunny

Not applicable
Author

Thank you Sunny for your help!

I found the right expression I need which is this:

Avg(Aggr(sum({< Regionaam=P(Regionaam),$(v.Actual),$(v.PeriodYear)>}[Units sold]), Regionaam)) I was using LandBestemming instead of Regionaam