12 Replies Latest reply: Feb 26, 2015 10:53 AM by Christopher Marlow RSS

    set analysis dates <= not working

    Jen Starr

      I'm having difficulty making the <= vCurrentYearDate work in my set analysis.  The variable, vCurrentYearDate gives me the last months prior month end if a month year selection is not made.  The variable is working and gives me the correct date, which is the last day of the month, however the set analysis is not giving me the data for the last day of the month.  It is treating it like a < not a <=.  I have removed all time stamps from the data.  If I change the variable to be the first day of the next month, I can get the last day of the month, but I would like to figure out why the <= is not working properly with this set analysis.


      Thanks so much!




      sum({<Year =, Month = ,Transaction_Date={">=$(=(vCurrentYearStart))<=$(=(vCurrentYearDate))"}>}Invoice_Amount)


      vCurrentYearDate = date(if(getselectedcount(Year)<>1 and getselectedcount(Month)<>1, date(Monthend(AddMonths(max(Transaction_Date),-1))), date(Monthend((max(Transaction_Date))))))