3 Replies Latest reply: Sep 27, 2017 9:54 AM by Sunny Talwar RSS

    value difference between random months

    Jacek Stypulkowski


      hope you can help in the below.

      I need to find turnover deviations for every month in comparison with previous month.

      The following expression works for one option - last month versus second to last month.

      Sum({<[Posting date.autoCalendar.Date]

      ={'>=$(=AddMonths( MonthStart (Today()),-1))<=$(=AddMonths( MonthEnd (Today()),-1))'}>} Turnover)

      -(Sum({<[Posting date.autoCalendar.Date]

      ={'>=$(=AddMonths( MonthStart (Today()),-2))<=$(=AddMonths( MonthEnd (Today()),-2))'}>} Turnover)),


      How to modify the expression to make it working for random months selection, e.g.:

      - select June to get the difference between June and May,

      - select March to get the difference between March - February, etc


      Appreciate any advice


      Many thanks