6 Replies Latest reply: Feb 18, 2015 6:11 AM by Timanshu Virmani RSS

    Make an MonthCounter

    Håkan Fogelin

      Hello,

      in my calendar do I have an 'InvoicePeriodCounter' and every month has two invoice periods.

      Though I want to show current month -1 it doesn´t work over the year end.

      How do I create the counter for the month over all years?

      Example:

      jan15    1

      jan31    1

      feb15    2

      .

      .

      dec31  24

      jan15   25

      jan31   26

      etc

       

       

      Period_counter:
      Load distinct
      [Flag] as [Flag1],
      [InvoiceYearMonth],
      [InvoiceMonthNum] as [InvoiceMonthCounter],
      recno() as [InvoicePeriodCounter]
      resident tPeriod_counter
      order by [Flag] asc;

       

      kindly

      Håkan