Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
asmithids
Partner - Creator II
Partner - Creator II

Previous Date Variable in Set Analysis

Hello,

I'm trying to show current and last year's weekend date sales (see attached).  I am using a variable below to calculate last year's weekend date.  The text box shows that the variable is working because I have a filter on the weekend field set to 5/27/2017 and the variable is showing the comparable date last year.  The issue is that the "All Fuel Types Prior Year" column in the straight table is showing the filter date (i.e. 5/27/2017) value and not the value from 5/28/2016. 

How anyone seen this issue before?  Thank you in advance for any assistance!

Variable:

vPYWeekending: =Max(FormattedWeekEndDate)-364

Expressions:

  1. All Fuel Types Current Year:  Sum({<Year={$(=Max(Year))}>}FuelMtrDtl_Posted_Units)
  2. All Fuel Types Prior Year:  Aggr(Sum({$<FormattedWeekEndDate={'=$(vPYWeekending)'}>}FuelMtrDtl_Posted_Units),FormattedWeekEndDate)
10 Replies
asmithids
Partner - Creator II
Partner - Creator II
Author

Changing the quotes did not work.  I tried that previously.  This is strange....