Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
rishikeshtiwari
Creator
Creator

Need data till before one Year

Hi Guys,

I have a requirement that I need to load data in QVD till before one year. I have a data set having data from Apr-2013 -Nov-2016.

But I need to load the data from Apr-2013 to Nov-2015 (till before one Year). I have attached an excel sheet. In this sheet yellow highlighted coloured data is not required in QVD. Please let me know how I can load this data in script.

Thanks in Advance

Rishi

12 Replies
sunny_talwar

May be like this:

LOAD *

FROM ....

Where Date <= AddYears(Today(), -1);

its_anandrjs

Try this way also

LOAD Date,

     Material,

     Plant,

     Sales

FROM

[Data Till Before One Year.xlsx]

(ooxml, embedded labels, table is DATA)

where Year(Date) <= Year(Today())-1;

Regards

Anand

its_anandrjs

You can try this way also by Addmonths

LOAD Date,

     Material,

     Plant,

     Sales

FROM

[Data Till Before One Year.xlsx]

(ooxml, embedded labels, table is DATA)

//where Year(Date) <= Year(Today())-1;

where Year(Date) <= AddMonths(Today(), -12);

Regards

Anand

sunny_talwar

its.anandrjs‌ why would you compare Year to a date here?

Where Year(Date) <= AddMonths(Today(), -12);

Did you mean to remove Year() function?

its_anandrjs

Thanks Sunny it is a typo mistake it will be Date

This is new code

LOAD Date,

     Material,

     Plant,

     Sales

FROM

[Data Till Before One Year.xlsx]

(ooxml, embedded labels, table is DATA)

//where Year(Date) <= Year(Today())-1;

where Date <= AddMonths(Today(), -12);

Regards

Anand

rishikeshtiwari
Creator
Creator
Author

Could you please attach the Qvw file.

rishikeshtiwari
Creator
Creator
Author

Please attach the Qvw file as well. This logic is not working.

rishikeshtiwari
Creator
Creator
Author

Please attach the Qvw. Logic is not working.

rishikeshtiwari
Creator
Creator
Author

Date <= AddMonths(Today(), -12)    is Working fine. Thank you a lot.