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: 
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!!!