Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Clerwyr
Contributor II
Contributor II

Total sales in a year and before

Hello (sorry for my english),

I made a formule which calculate Sales by PRG, Type and DAT_year.

But I want sales of PRG and Type of the year and previous years. For exemple in DAT_year 2016, i want total sales 2016+2015+2014+...

This formule works, but the year of reference is not variable (2016)... Thanks for your help !

sum(aggr(
Sum(total <PRG,Type> {<DateOperation={"<=$(=makedate(2016,12,31))"}>} Sales)
,PRG,Type,DAT_year))

4 Replies
sergio0592
Specialist III
Specialist III

Hi,

Try with :

sum(aggr(
Sum(total <PRG,Type> {<DateOperation={"<=$(=makedate(DAT_year,12,31))"}>} Sales)
,PRG,Type,DAT_year))
Clerwyr
Contributor II
Contributor II
Author

Hello Sergio,

It don't works. It give me the max DAT_year...

adequation_jna
Contributor II
Contributor II

Hello all,

I'm a colleague of "Clerwyr" , please find attached a POC (.qvf) to resume our issue.

 

 

adequation_jna
Contributor II
Contributor II

POC_Formule_TauxEcoulement.png