Discussion Board for collaboration on QlikView Scripting.
In the script, i have a table with the fields :
Date, CD_SOCIETY,CD_ENTITY,CD_PRODUT, VOLUME
I want to add a field VOLUME_N_1 wich is the value of VOLUME for last year using the field VOLUME.
How can i do this in the script please ?
Go to Solution.
IF(YEAR=Max(YEAR), VOLUME) AS VOLUME_N_1;
year(Date(Date)) AS YEAR
Do you mean that records in this year have an additional field that shows the total volume for last year for all products etc ?
IF(Max(year(Date(Date,'YYYY'))) >0, VOLUME) AS VOLUME_N_1