Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Range Selection Compare Previous Year

I hope there is an easy solution for this.  But i'm having trouble creating a variable that computes the previous years selection.

Selection:

SHIFT_DATE >=01/30/2017 <=05/28/2017

I want a variable for the following:

vMaxCompareDate = 05/28/2016

vMinCompareDate = 01/30/2016

My goal is to create a trend per day of previous years selection without going back and forth between selections.

10 Replies
Anonymous
Not applicable
Author

This worked perfect.

Also my formula was off by a space between the = $  I needed to delete it.

Sum({<SHIFT_DATE = {'>= $(=vMinCompareDate)<=$(=vMaxCompareDate)'}>}Labor_Cost)

Sum({<SHIFT_DATE = {'>=$(=vMinCompareDate)<=$(=vMaxCompareDate)'}>}Labor_Cost)