5 Replies Latest reply: Mar 8, 2018 11:08 AM by Pete Bolin RSS

    How to count values between two dates (variables)

    Pete Bolin

      I've seen a few questions regarding this, which have been very helpful, but I still can find the answer to this.


      I created two variables, one which calculate three days before the first day of a month and the second which calculates three days before the end of a month. Here they are:


      vEndDateminus3=  date(monthend(APH_DATE)-3, 'M/D/YY')


      vStartDateminus3= date(MonthStart(APH_DATE)-3, 'M/D/YY')


      I have values called COI which I'd like to count how many occured between vStartDateminus3 and vEndDateminus3. This is what I have:


      Count({<{'$(=vStartDateminus3)'} = {'>=$(=vEndDateminus3)'}>}[COI])


      Not working! Any help would be appreciated!