Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help needed in the below expression

Hi

=aggr(

  If(sum({$<Customer_ID, Cust_Year,Category, Product={'Global','State'},Year={">=$(=max(Year)-1)"}>}Value)

  >= v_Quartile1,

  'Over ' & num(v_Quartile1/$(v_Measure), '$#,##0.0'),

If(sum({$<Customer_ID, Cust_Year, Category, Product={ 'Global','State'}, Year={">=$(=max(Year)-1)"}>}Value)

  < v_Quartile2,

  'Under ' & num(v_Quartile2/$(v_Measure), '$#,##0.0'),

)) ,Cust_Year))


In the above expression if i select some values in  filters for category and Product, the values are changing. I want these filters to be ignored irrelevant of the selections we make in filters.

John

5 Replies
sunny_talwar

Give this a shot:

=Only({<Category, Product = {'Global', 'State'}>}

  Aggr(

  If(Sum({$<Customer_ID, Cust_Year,Category, Product={'Global','State'},Year={">=$(=max(Year)-1)"}>}Value)

  >= v_Quartile1,

  'Over ' & num(v_Quartile1/$(v_Measure), '$#,##0.0'),

  If(Sum({$<Customer_ID, Cust_Year, Category, Product={ 'Global','State'}, Year={">=$(=max(Year)-1)"}>}Value)

  < v_Quartile2,

  'Under ' & num(v_Quartile2/$(v_Measure), '$#,##0.0'))), Cust_Year))

maxgro
MVP
MVP

maybe you have to disregard category and product also in

max(Year)

Anonymous
Not applicable
Author

Thnx Sunny, Actually I tried with Only({1} Aggr expression) but it didn't worked, may i know how different it would behave.

John

sunny_talwar

Not much, I guess try maxgro‌'s recommendation

Anonymous
Not applicable
Author

Sure Maxgro, will try  this..

John