Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, could you please help me to modified the following load script?
Load
GRTVAL_CMPVER,
GRTVAL_CODCOF,
GRTVAL_DEBAJA,
GRTVAL_FECALT,
GRTVAL_FECCAL,
Year(GRTVAL_FECCAL) & Num(Month(GRTVAL_FECCAL),'00') & Num(Day(GRTVAL_FECCAL),'00') as %Key_CREATED_ITEMS_MOVIMIENTOS_VENTAS,
GRTVAL_FECMOD,
GRTVAL_HORMOV,
GRTVAL_LOTORI,
GRTVAL_LOTREC,
GRTVAL_LOTTRA,
GRTVAL_MODULE,
GRTVAL_OALIAS,
GRTVAL_SYSVER,
GRTVAL_TSTAMP,
GRTVAL_ULTOPR,
GRTVAL_USERID,
GRTVAL_VALORI
FROM
what i have is
date | value |
---|---|
10/1/2014 | 4 |
10/2/2014 | 5 |
10/3/2014 | 6 |
10/4/2014 | 7 |
but what i need is
date | value |
---|---|
10/2/2014 | 4 (10/1/2014 value) |
10/3/2014 | 5 (10/2/2014 value) |
10/4/2014 | 6 (10/3/2014 value) |
10/5/2014 | 7 (10/4/2014 value) |
is it clear?
thanks!
Just do this in your load script.
Here DATE_FIELD is your field that you are trying to take off one day.
Date(Timestamp(DATE_FIELD-1),'MM/DD/YYYY') as DATE
Load date,
previous(value) as value
Form yoursource;
Load date(date+1) as date,
value
From yoursource;
You may actually want to do this in the table you are displaying the data in itself. This could be done using the ABOVE() function. This function will display the value of a cell that is a specified distance above. The Syntax is:
Above([TOTAL] Expression [,Offset[,n]]).
If you do not specify or use the TOTAL qualifier it will default to displaying the value of the row directly above it. If this is something that has to be done in the load script however, this will not help
Great! This works! Thanks
Sent from my Windows Phone
Seems you question is answered. Can you mark this thread as "Correct Answer" and/or "Helpful answer"? so that rest can find this useful.
Sure...its what i was looking for...
Sent from my Windows Phone