2 Replies Latest reply: Jul 26, 2012 3:51 PM by Kevin Bertsch RSS

    Arithmetic with a variable

      I'm sure this is rock-stupid, but I can't find the correct syntax anywhere.


      I have a variable, vMaxYear. My expression



      aggr(count({<Year={"$(vMaxYear)"}>} distinct dlogin),COC_Company)



      works perfectly well to give me a count of "dlogin" by Company when the year = max year.


      Now, I want to find out what happened in the previous year. I have tried "$(vMaxYear)-1", "$(vMaxYear-1)", "=$(vMaxYear)-1", and other

      variations on the theme. None work. I have searched through the documentation, and can't find anything on the correct syntax.


      Could anyone help?