Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr using excluded fields

Hello,

I have the following expression, which is working fine.

avg(aggr(sum({<Quarter= {$(=Max(Quarter)), $(=Max(Quarter)-1), $(=Max(Quarter)-2), $(=Max(Quarter)-3)}>}Sales), Product, Quarter, Customers))

However, I need to build a second one, which still gives me the results aggregated by Product, Quarter and Customersbut I must ignore whatever selection is active in Customers so that I can compare the two sets of results, one related to a specific Customer and one related to the overall average Sales amongst them.


I've tried all the set analysis I could think of but I did't manage to get it to work - when I select values in Customers, the selection applies to the second expression no matter what.


Can somebody please help?


Thank you!


Linda

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You may need to use a set analysis expression like {$<Customers=>} both in the outer and in the inner aggregation function. E.g.

   Avg( {$<Customers=>} Aggr( Sum( {$<Customers=, Quarter= {...} >} Sales ), ... ))

HIC

View solution in original post

2 Replies
hic
Former Employee
Former Employee

You may need to use a set analysis expression like {$<Customers=>} both in the outer and in the inner aggregation function. E.g.

   Avg( {$<Customers=>} Aggr( Sum( {$<Customers=, Quarter= {...} >} Sales ), ... ))

HIC

Not applicable
Author

Thank you!

Thank you!!

Thank you!!!