1 Reply Latest reply: Mar 29, 2016 3:01 AM by Andrew Mein RSS

    date function in qlik sense

    Sonam Mehta

      Hi, I am wondering why the below code doesn't get me year, date, month, fields in assets. Is there something wrong with my calendar code?

       

      LOAD

          "Date",

          "# of calls",

          "Average Length of Call (minutes)",

          "# of abandoned calls",

          "Average Speed of Answer (seconds)"

       

       

      FROM [lib://AttachedFiles/Call Data - July 2014 to Dec 2015.xlsx]

      (ooxml, embedded labels, table is Sheet1);

       

       

      Calendar:

      DECLARE FIELD DEFINITION TAGGED '$Date'

         Parameters

            first_month_of_year = 1

         Fields

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

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

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

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

            Weekday($1) as Weekday Tagged '$weekday',

       

       

      DERIVE FIELDS FROM FIELDS Date USING Calendar;