Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
aatish12345
Creator II
Creator II

Selecting Date range in Date picker from last 30 days till today

Hi All.. When user accessing a sheet with sheet name let's say 'Sheet1" in Qliksense then I want to show last 30 days to be selected from today's date by default in Date range picker...

Can anyone plz help me out with this?

 

Aatish

1 Solution

Accepted Solutions
EliGohar
Partner - Creator III
Partner - Creator III

Try this expression please:

= '>=' & Date(Today()-30) & '<=' & Date(Today())

Eli.

View solution in original post

5 Replies
EliGohar
Partner - Creator III
Partner - Creator III

Using Actions (in sheet properties):

1. select action - Select values matching search criteria

2. Choose your date field

3. Set the following expression:   ='>=' & Date(Today()-30)

When you'll open the sheet it will automatically select the last 30 days.

Eli.

aatish12345
Creator II
Creator II
Author

Hi Eli,

Thanks for your valuable help..

The solution you've provided is selecting values from last 30 days till future dates also, since I have some future dates as well in date field..

I was looking for a solution which will select values from last 30 days till Today only...that means range of 30 days from last 30 days till today's date

 

Aatish

EliGohar
Partner - Creator III
Partner - Creator III

Try this expression please:

= '>=' & Date(Today()-30) & '<=' & Date(Today())

Eli.

aatish12345
Creator II
Creator II
Author

Hi Eli,

 

Yes, now it is working as expected..

Thanks you very much for this ☺️

 

Aatish

harithadogiparthi505
Contributor III
Contributor III

Hi EliGohar,

I have used the similar expression to select the default date range.

The problem which I have encountered during my process is :

I have 4 sheets in my dashboard, first sheet is showing default range and when entered into second sheet its good showing def range and when coming back to first sheet again its showing automatically previous week of default range. Is there any alternate solution?

Please suggest me the solution .

Thanks in advance.