6 Replies Latest reply: Nov 13, 2012 9:47 AM by steve peroni RSS

    set analisys

    steve peroni


      I'm trying to use the following expression, but it doesn't work:


      sum({<MY_YEAR={$(=Only(year(today())-1))}, MY_MONTH= {"<= 11 "}>} MY_VALUE    )


      My aim is to calculate the sum of purchase, regarding the previous year and till november


      Help please !!


      Thanks in advance

        • Re: set analisys
          Stefan Wühl

          You might cope with at least two pitfalls here:


          - If user can select in any calendar field other than MY_YEAR and MY_MONTH, you need to explicitely clear these fields to avoid inconsistent selection state.


          sum({<MY_YEAR={$(=Only(year(today())-1))}, MY_MONTH= {"<= 11 "}, MY_DATE= >} MY_VALUE)


          - If MY_MONTH is not numeric only, but a dual, you might need to compare the text value in the set modifier (i.e. try using a numeric Month field).


          I usually don't use year and month for set modification, but a Date field, then clear all other fields.


          Hope this helps,