Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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
Employee
Employee

Re: Aggr using excluded fields

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

2 Replies
Employee
Employee

Re: Aggr using excluded fields

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

Re: Aggr using excluded fields

Thank you!

Thank you!!

Thank you!!!

Community Browser