Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a table with start date and enddate taht begins from 1965 .how to turn the lines before 2015 for both start and end dates?
what you mean by to turn the lines?
Could you share sample of the source data and what you hope to achieve?
i mean to remove them.i would just keep the lines where start and end date >=2015
Maybe this:
if(StartDt<'01/01/2015' and EndDt<'01/01/2015', 'Before 2015', 'After 2015')
I guess you want to filter the data from the table after certain date and then bring it into the Visual Canvas.
If that is the case you can filter the data in your script editor using WHERE clause.
In your load Script you can include the where statement if you don't want those lines
TableSample:
Load
A,
B,
StartDate,
EndDate
From ..........
Where Year(StartDate) >=2015 AND Year (EndDate) >=2015
Hope this helps
Add On open of the sheet trigger.
like a trigger is added on Button in the given solution
Try this it will kept 2015 to up to date data
e.g.
Date:
load * inline [
StartDate,EndDate
2011,2011
2012,2012
2013,2013
2014,2014
2015,2015
2016,2016
2017,2017
2018,2018
];
store Date into 'C:\Users\Desktop\StartDate.qvd'(qvd);
drop table Date;
Set vStart='2015';
Set vEnd='Year(today())-1';
for vYear=$(vStart) to $(vEnd)
set vNewYear=$(vYear);
😧
LOAD if(StartDate=$(vNewYear),StartDate) as StartDate,
if(EndDate=$(vNewYear),EndDate) as EndDate
FROM
(qvd);
next