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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
baderbd
Contributor II
Contributor II

Expression to show only dates in next two weeks

I built an expression to find all dates in the next two weeks, but it also shows dates in the past. How can I update my expression to remove the dates in the past 

this is my expresison (its on a button)

='<=' & Date(Today()+7, 'YYYY-MMM-DD')

Labels (3)
2 Replies
TauseefKhan
Creator III
Creator III

Hi @baderbd,

Check this :

= '>=' & Date(Today(), 'YYYY-MMM-DD') & '<=' & Date(Today() + 14, 'YYYY-MMM-DD')

***Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.***

Ryan_McGregor
Contributor II
Contributor II

Hello there, 

I have an application which runs everyday and features a rolling 12 week window. I use two variables in the load script, which are:

LET vCurrentWeek = WeekStart(Today());

LET vRollingWeeks = WeekStart(Today())-13; (you could change this to -1 for a 2 week window)

I use Set analysis in a Measure to filter the data to the timeframe I want to show.

WeekStartDateField={">=$(vRollingWeeks)<$(vCurrentWeek)"}

 

Hope this helps