Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
Is "Date" definitely recognised as a Date type?
Other option - if you are using version 2.2, you could use the Data Manager to import your data, it would add the Calendar syntax for you. (it looks to add brackets "()" around the variables)