10 Replies Latest reply: Jun 5, 2017 4:52 PM by Alec Smith RSS

    Previous Date Variable in Set Analysis

    Alec Smith



      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!



      vPYWeekending: =Max(FormattedWeekEndDate)-364



      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)