6 Replies Latest reply: Sep 2, 2013 6:46 AM by Thomas Jensen RSS

    Yesterday variable



      I have this in my data:


      A column with dates like:

      Date_Clean: 2013-09-01


      I have these variables in my edit script:

      LET vDateToday = num(Date(Today(), 'YYYY-MM-DD'));

      LET vYesterday = num(date(vDateToday-1, 'YYYY-MM-DD'));

      LET vPast15Days = num(date(vDateToday-15, 'YYYY-MM-DD'));


      And this variable in my document:


      vLast15Days           ='>=$(vPast15Days) <=$(vDateToday)


      I want to show sum(amount) on dates - my problem is:


      This one works fine:

      =sum({<Date_Clean={'$(vLast15Days)'}>} TotalPrice)


      but this one doesnt not work:

      =sum({<Date_Clean={'$(vYesterday)'}>} TotalPrice)


      my output for the 3 variables are:


      vDateToday= 41519

      vYesterday = 41518

      vLast15Days = >=41504 <= 41519


      So why does my Yesterday variable not show any sum ? When it is included in vLast15Days..