is it possible to create in the script an "End Date" which is based on the "start date"?
Currently i get data from SAP where the start date of a price of an article is given but the end date is not.
See the table below
Is there a possibilty to calculate the End-Date based on the Start date by calculating
if there s a previous Start Date then calculate the current data record of the start date -1 , else set End-Date = 31.12.2999
Hope anyone can help me here.
Maye be :
LOAD [Article No], Date#([Start Date],'DD.MM.YYYY') as [Start Date], [End Date] , Price INLINE [
Article No, Start Date, End Date, Price
load [Article No],[Start Date],if(rowno()=1,Date#('31.12.2999','DD.MM.YYYY'),Date(previous([Start Date]-1),'DD.MM.YYYY')) as [End Date] ,Price;
load * resident Data order by [Start Date] DESC;
drop table Data;
View solution in original post