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

Last 2 Months Data if Date format is DD-MMM-YY

 

Hi,

I have a requirement where i have to load always last 2 months data.I am unable to get the expected output withe below script.Can any one suggest me if I miss any thing below.

Sales:
LOAD * INLINE [
Dates, Sales
13-Jun-19, 10
15-Jul-19, 20
22-Aug-19, 25
11-Sep-19, 30
]

where Date(Date#(Dates,'DD-MMM-YY'),'MM/DD/YYYY')>'08/01/2019;

Labels (1)
1 Reply
dplr-rn
Partner - Master III
Partner - Master III

change where clause to below

where Date(Date#(Dates,'DD-MMM-YY'),'MM/DD/YYYY')>Date#('08/01/2019','MM/DD/YYYY');

 

or to make it more generic

where Date(Date#(Dates,'DD-MMM-YY'),'MM/DD/YYYY')> AddMonths(MonthStart(today()),-1);