6 Replies Latest reply: Jan 30, 2018 10:26 AM by beck bakytbek RSS

    Declare and Derive functions for Master Calendar

    beck bakytbek

      Hi Folks,

       

      i have this example-data to generate the master calendar:

       

      OrgSales:

      load * inline [

      InvoiceDate, Product, OrderNo, Sales

      01.01.2013, Chains, 101, 5500

      08.02.2014, Seats, 101, 4800

      03.03.2014, Brake Oil, 102, 6500

      09.05.2018, Helmets, 104, 4500

      ];

       

      Calendar:

      Declare Field Definition Tagged '$date'

      Parameters

      first_month_of_year = 1    // OR  first_month_of_year = 3

      Fields

      Year($1) as Year Tagged '$year',

      Month($1) as Month Tagged '$month',

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

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

      Groups

      Year, Month, Date type collection as YearMonthDate;

       

      Derive Fields from Fields InvoiceDate Using Calendar;

       

       

      everything does work great, but i have a question: the row:  first_month_of_year = 1 // OR  first_month_of_year = 3,

      what does it mean? and which consequences do i have if i choose 1 or 3.

       

      Thanks a lot

      Beck