Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
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