Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
BenRoebuck
Contributor
Contributor

Find Start Date and End Date entered by user in Date Picker

Hi,

 

I'm using the Date Picker object to allow the user to select what range of sales data they want to look at.

I'd also like to have a comparison to a previous time period. I.e if they select last 30 days it would show whether we're up or down vs the last 60 days.

My question is how can I get the value of the entered date range?

 

Many Thanks

 

Ben

Labels (1)
1 Reply
edwin
Master II
Master II

i beliave it doesnt really matter how the dates are selected (using a list or other objects).  final outcome is a list of values are selected.  have you tried the simpler expressions to get the range?  i would save these in variables so you can compute the comparison dates

vLowRange=date(min(YOURDATEFIELD))
vHighRange=date(max(YOURDATEFIELD))

vLowCompare=date(vLowRange-30)
vHighCompare=date(vHighRange-30)

and then you can use these dates in your set analysis: {<YOURDATEFIELD={">=$(vLowRange)<=$(vHighRange)"}>} for the current period; {<YOURDATEFIELD={">=$(vLowCompare)<=$(vHighCompare)"}>} 

 

obviously, these dates will not align on same line (9/1/2020 will not align with 10/1/2020).    to make them align you need some scripting and of course depending on the requirements