Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
yashcena
Contributor III
Contributor III

Date Range using variable in Set Analysis

I have monthly ticket data in my data model. 

 

yashcena_0-1594293376147.png

 

Every month there is a release (different release date for every month), I need to show the ticket count 7 days before the release and 7 days after the release

 

Capture.JPG

 

I'm able to show the overall ticket count before and after release. However I want only +/- 7days from release ticket count.

 

I have created 3 variables:

vPrevDays = date(RELEASE_DATE-7, 'MM/DD/YYYY')

vRelDate = date(RELEASE_DATE, 'MM/DD/YYYY')

vNext7Days = date(RELEASE_DATE+7, 'MM/DD/YYYY')

However, I'm not able to write the set analysis syntax correctly

I have attached a sample qlikview file here. Any help would be appreciated! 🙂

 

 

 

 

 

 

Labels (3)
2 Replies
arulsettu
Master III
Master III

Maybe like this

preivious-

sum({<RELEASE_DATE={'$(=date(max(Date(RELEASE_DATE))-7, 'MM/DD/YYYY'))'}>}CASE)

After

sum({<RELEASE_DATE={'$(=date(max(Date(RELEASE_DATE))+7, 'MM/DD/YYYY'))'}>}CASE)

 

Kushal_Chawda

try

Before-

sum({<RELEASE_DATE={'>=$(=date(max(RELEASE_DATE)-7))<=$(=date(max(RELEASE_DATE)))'}>}CASE)

After-

sum({<RELEASE_DATE={'>=$(=date(max(RELEASE_DATE)))<=$(=date(max(RELEASE_DATE)+7))'}>}CASE)