4 Replies Latest reply: Apr 16, 2015 2:46 PM by Sunny Talwar RSS

    Set Analysis - Any Other Criteria With Fixed Date

    Matt N

      I am attempting to show the 13 week average but want to allow any criteria selection to adjust this total (including the dates (i.e. users can look at last week or the previous compared to the 13 week avg)). I think the answer is close but my troubleshooting is going in circles.

       

      I have the 13 weeks set. This appears  complex but I only want to show the last 13 weeks in an environment which has future ship dates.

       

      sum({<ShipCalWeekStart = {'>=$(=WeekStart(Max({1<ShipDate = {'<=$(=today())'}>} ShipCalWeekStart),-13))<=$(=WeekStart(Max({1<ShipDate = {'<=$(=today())'}>} ShipCalWeekStart),-1))'}>} ShipmentTotal)

       

      If I add The Identifier {1} to look at the complete application as I want for the dates. I then lock out the many criteria sections I wish users to use.

       

      sum({1<ShipCalWeekStart = {'>=$(=WeekStart(Max({1<ShipDate = {'<=$(=today())'}>} ShipCalWeekStart),-13))<=$(=WeekStart(Max({1<ShipDate = {'<=$(=today())'}>} ShipCalWeekStart),-1))'}>} ShipmentTotal)


      What am i missing to allow for Criteria 1,2,3....to show their 13 week avg?


      Appreciate the help.