6 Replies Latest reply: Dec 14, 2015 9:02 AM by Joanna Seldon RSS

    Financial Quarter

    Joanna Seldon


      I have the following calendar code

       

      Calendar: DECLARE FIELD DEFINITION TAGGED '$date' Parameters first_month_of_year = 1 Fields


           Year($1) As Year Tagged '$year',
          
           if( Month($1)>=4, Year($1), Year($1) -1) as FiscalYear Tagged '$fiscalyear', 

           Month($1) as Month Tagged '$month',
          
           if( Month($1)>=4, Month($1)-3,Month($1)+9) as FiscalMonthNumber Tagged '$FiscalMonthNumber',

           Date($1) as Date Tagged ('$date', '$day'),

           Week($1) as Week Tagged '$week',

           Weekday($1) as Weekday Tagged '$weekday',
          
           WeekEnd ($1) as WeekEnd Tagged '$weekend',
          
           'Q' & Ceil(Month($1)/3)  as FinancialQuarter Tagged '$FinancialQuarter',
          
         
          

           DayNumberOfYear($1, first_month_of_year) as DayNumberOfYear Tagged ('$numeric');

       

      DERIVE FIELDS FROM FIELDS [EventDate] USING Calendar;

       

       

      but I have an issue where Q1 starts Jan, Feb, March, BUT I need Apr, May, June as Q1

       

      Please help