Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Vinni2000
Contributor III
Contributor III

Pull only last 20 days data

I have a timestamp in this format 01-FEB-21 01.48.36.00000000 PM so here I want to pull last fifteen days only from qvd to report 

1 Reply
chematos
Specialist II
Specialist II

You should first format the date, you can do it in a few ways, this is just an example that could help you in future scenarios as well. 

First, you may want to take a look on how to create an Inline Map table for the Months, so you can map the month name and its corresponding number:

JAN, 01

FEB, 02

...

DEC, 12

Then you should look for the ApplyMap() function, MakeDate() function and Substr() function. Using these 3 functions will allow you to have the date formatted properly so you can filter the QVD in the WHERE clause by any timeframe you need. I recommend as well to duplicate the Date field having one field as Date format and another field as Number because it is easier to use the number for filtering your QVD and also for set analysis formulas in the layout as well. 

Hope this helps, I am not writing all the code so you can explore the different functions and possible solutions that fit better with your work.

 

Regards,