Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

last 21 days - button

hi,

i want a button that chose the last 21 days.

the feild is "date"

how i need to wrote it ?

thanks'

yarin

1 Solution

Accepted Solutions
mdmukramali
Specialist III
Specialist III

Hi,

use the below expresstion in Search String.

='>' & Date(Today()-21,'DD/MM/YYYY') & '<=' & Date(Today(),'DD/MM/YYYY')

PFA.

Last 21 Days.PNG

Thanks,

Mukram.

View solution in original post

2 Replies
mdmukramali
Specialist III
Specialist III

Hi,

use the below expresstion in Search String.

='>' & Date(Today()-21,'DD/MM/YYYY') & '<=' & Date(Today(),'DD/MM/YYYY')

PFA.

Last 21 Days.PNG

Thanks,

Mukram.

vishsaggi
Champion III
Champion III

Just create a variable for 21days like

Click Ctrl+Alt+V

Then add v21Days as variable name. Then

= Date(Max(YourDate) - 21, 'MM/DD/YYYY')

Then use something like this.

Making sure you got your data format correctly.

LOAD *,

           Date(Date#(Date, 'MM/DD/YYYY'), 'MM/DD/YYYY') AS YourDate

From ......;

Then create a button and in Action tab add Select in Field and add your fieldname as YourDate then use below expession:

= '>=' & v21Days