Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
In my excel sheet if have columns with as name the year (2014,2013,2012, etc)
In the load script i have a calculated field where i use last (2014) and the previous year (2013).
Next year I need to use the columns 2015 and 2014.
I want to create a variable vLastYear and vPrevYear so I can use these in stead of hard coded data. So I only have to change the content of the 2 variables vLastYear and vPrevYear.
Load *,
....
If( ([2014] > [2013]) ,Chr(9660), Chr(9650) ) As Direction
.....
Resident TableName;
Any suggestions ??
Thanks.
Hi Richard,
If I were you I'd probably load the data in using a crosstable. Then, if you use a resident load on the data, ordering by your key fields, and year, you can do your comparisons by using the peek command rather than having to refer to field names that will change year on year.
Marcus
Marcus,
Thanks so far.
I'm trying it and see if I can use the Peek.
I never used it.
HI Richard
Please try the below variables in the load script
Let vThisYear = Year(Today());
Let vPreviousYear = Year(Today())-1;
Thanks and regards
Padma