Qlik Community

New to Qlik Community

Discussion board for questions on how to use Qlik Community and its features.

This forum is for questions and information about how to use the Qlik Community.
Please do not post product related questions here.
Select the correct forum from: Qlik Product Forums
New Contributor

Qlik Sense

Hi all,

If  I have to create an expression by using filter and two max conditions, how it is possible that when i filtered out some data then that calculation will work as per that filter. Below is an expression used.


If i am filtering out Year 2019 then it will pickup max week as '01' follows with its sales number.

I hope I am clear with my query.



4 Replies

Re: Qlik Sense

This should already be doing that, isn't it? The expression below should change based on different selections you make... is it not doing that?

Sum({<Weeks = {$(=Max({<[Destination]={$(=Max([Destination]))}>} Weeks))}>} [Sales])
New Contributor

Re: Qlik Sense

No, even I tried to replace destination with year....

Re: Qlik Sense

Would you be able to share a sample to show the issue?

New Contributor

Re: Qlik Sense

It is working now
Current Year : Sum({<Weeks = {$(=Max({<[Year]={$(=Max([Year]))}>} Weeks))}>} [Sales])
Previous Year : Sum({<Weeks = {$(=Max({<[Year]={$(=Max([Year])-1)}>} Weeks))}>} [Sales])
Community Browser