4 Replies Latest reply: Mar 16, 2018 6:38 AM by Aaron Dhobi RSS

    Variable for previous year sales

    Aaron Dhobi

      Hi guys,


      I am trying to calculate sales for the previous year. I have made a variable as i thought it would be easier. When i make a selection i.e a month (feb 2017), i want this new measure to calculate the year before(Feb2016).

      Currently it just shows the same sales as the selection made.


      I have a date field,"Date1" and sales field "NetValue".


      vLY= Year=,Month=,Week=,Day=,Date=,[Date1]={">=$(=date(addmonths($(vMinDate),-12)))<=$(=date(floor(addmonths(vMaxDate),-12))))"}

      expression used =          sum({<$(vLY)>}NetValue)



      I have also removed "Year=,Month=,Week=,Day=" from the variable and it makes no difference.

      It still shows the same results as " sum(NetValue)"

      is the variable wrong?