Discussion Board for collaboration on QlikView Scripting.
In the attached QVW I have 3 variables: Country, Year and #Price.
For each Country I want to calculate in the LOAD Script the Price index based on the first year of data. Each country has a different start year.
The calculation must be something like this, per country: ('#Price concurrent year' / '#Price first year') * 100
Can somebody help me to integrate this in the LOAD Script. I also attached the data source in excel.
Your help is appreciated! Arthur
Go to Solution.
some little changes (bold) to your script to add the column #PriceFirstYear in every rows
[tsiir020 frozen as of 21 Dec 2011.xls]
(biff, embedded labels, table is Sheet0$);
num#(Year) as Year,
#data as #Price
Resident Price_tmp Where [#data]<> ':' ;
Left Join (Price2_tmp)
FirstSortedValue(#Price, Year) as #PriceFirstYear,
FirstSortedValue(Year, Year) as #FirstYear
DROP Table Price_tmp; // Price2_tmp;
Great job, you helped me a lot. Thanks