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

max function in chart is ignoring dimension

I have a straight table where i have to show sum over a date range. The starting point of date is fixed (4th highest date) but end point variable. (like 7th or 10th highest date) depending on a field called SIT.

So, I store variable as vSIT = SIT

=sum({<W_Period={">=$(=max(W_Period,$(=vSIT))))<$(=max(W_Period,4))"}>}WS_Qty)

My dimension is Country. If I use the above expression , if  I hard code then it is taking fine but when i pass variable it is taking maximum value of that field ignoring my country dimension. Please advice.

  

CountrySIT
INDIA16
INDONESIA7
JAPAN6
KOREA6
MALAYSIA WEST5
NEW ZEALAND8
PHILIPPINES5
TAIWAN6
THAILAND6
VIETNAM7
1 Reply
sunny_talwar

Didn't Stefan already help you on this?

Max function as variable in chart ignoring dimension