Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
Showing results for 
Search instead for 
Did you mean: 

Sum value of field with value -1

Hi everyone, right now I have this Expression:

Sum({<[Tipo Fecha]={'M'}>}[Unidades Vendidas Ant])

Which gives you the the Sum based on a Year.

But I want to calculate it using The selected Year -2 and the selected Year -3.

I mean 2 years ago o 3 Years ago.

I tried something similar to:

Sum({<[Tipo Fecha]={'M'}>-2}[Unidades Vendidas Ant])

But it's not working.


Any suggestions or ideas?

Thanks a lot.

2 Replies

Try this for Year-2:

Sum({<[Tipo Fecha]={'M'}, Ano={$(=max(Ano)-2)}>}[Unidades Vendidas Ant])

Digital Support
Digital Support

The following Design Blog post may be of some use in explaining things a bit too:


If the partners response did get you what you needed, we would appreciate it if you would close out the thread by using the Accept as Solution button on their post, which will give them credit for the help and let other Members know that worked.


To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.