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

Extract data based on the date

Hi All

Can some one please help me in writing the expression to extract the data only if the below condition matches

a)If the date selected is between the month i.e., in the middle of the month data has to be displayed for the last month and not the present month

Thanks and Regards

D Swathi

2 Replies
khalander
Creator II
Creator II

Hi,

Please follow below process

let vLastMonthEndDate=MonthEnd(Today(),-1);

select * from

Table

where date <= 'vLastMonthEndDate';

Anonymous
Not applicable
Author

Could you please elaborate your requirement.

As per my understanding if the user clicks on the date field i.e middle of the current month(or any selected month) then data should be displayed  last month .

If so, try this ,

let VmaxDate = Date(Max(Date)-1);

let VMonthEnd = MonthEnd(Date(Max(Date)));

In Script

Select * FROM

WHERE DATE >= 'VMaxDate' and Date ='VMonthEnd';