Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
My QVD are in the below format,
QVDName_MM_DD_YYYY.qvd.
As per the need I need to keep the latest 12 months QVD.
For instance, if I have first qvd is Jan 2022 then I need to maintain QVd till Feb 2021.
Could you please assist me on this?
Can we write the QVd deletion logic in the QS load script?
Thanks
Thanks
try something below
Where monthstart([YourMonthYear]) >= monthstart(addmonths(today(),-12))
or
FROM Source;
Where MonthYear >= (Addmonths(Today(),-13));
or
Load *
from DataQVD.qvd(qvd)
where Date >= AddMonths(Monthend(today()),-13) and Date < Monthstart(today());
or
Qlik Sense is not really the best tool for tidying among your files, there are no file delete functions built into Qlik Sense. If you need to delete older files you need to rely on some kind of execute script that does the deletion for you. If youbhave no other tool then consider creating a bat file that you schedule on the server.
An alternative work around if you only need 12 months then you could consider not storing the files to qvd files named with both year and month in the FileName. If you only use Months (Jan, feb,...,dec) then you will just have 12 files that will be overwritten once every 12 months.
Instead of deleting QVDs, you may want to just load the recent 12 months. See
https://qlikviewcookbook.com/2022/03/how-to-segment-qvd-files/
-Rob
Hi All,
Currently, there is a need of deletion logic. some QVds need to maintain for last 4 months and some for 12 and 15 months.
Our QVd's are in the below format.
QVDName_MM_DD_YYYY.qvd.
Could you please assist me how to create the bat file for the same?
Thanks