4 Replies Latest reply: Nov 8, 2017 4:41 PM by M Edwards RSS

    Expression to select prior period data given month, year

    M Edwards

      I have a calendar with fields for Month, Year, MonthYear. Formatted as follows:


      Month  Year  MonthYear

      Jul          2017     Jul-2017

      Jun         2017     Jun-2017

      If selection for Month is Jul, Year is 2017, How do I count records for Jun-2017?


      I have the following expression, but it returns nothing:


      Count({$<MonthYear={"$(=Date(AddMonths(GetFieldSelections([Month],1) &'-' & GetFieldSelections([Year],1),-1),'MM-YYYY')"}>} InvoiceNo)


      Any help appreciated, Thanks