Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Remove outdated data

Hi Qlikview Developers,

I have a data set dating back to 2011 which I only want to upload the most recent date. How do remove data from Sept 2013 and back by using a script? Below is the script but it is not working. Please advise.

Here's the script:

 

if((Period_End_Date)>9/30/2013,date(date#(left(Period_End_Date, 10),'MM/DD/YYYY'),'MMM-YYYY'), Period_End_Date)as Period_End_Date

Thank you.

Jasmine

4 Replies
MK_QSL
MVP
MVP

You can do something like below in script..

Load

     Field1,

     Field2

....

From TableName

Where Period_End_Date >  Date#(FLOOR(Period_End_Date),'M/D/YYYY');

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you want to load only data newer than 9/30/2013 you can use a where clause:

MyData:

Load * from MySource

Where Period_End_Date > '9/30/2013'

You may have to use the date# and/or date functions to pass the value in the correct date format.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

Thank you for your quick response. I used (Where Period_End_Date > '9/30/2013') and return just Sep-2013 data. Is there a way to show Sep-2013 and onward data?

Thanks,

Jasmine


Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The where clause you used should load the data from October 2013 and later. If it shows data from September 2013 only then the where clause is not working. That probably means the date format is not correct. Without seeing the actual data I cannot tell what would be the right date format.


talk is cheap, supply exceeds demand