Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have created a crosstable and would like to generate the month for the field Week.So when i use the below script it doesnt seem to work and doesnt give me the month for the corresponding Week
Can anybody please help as I dont know whats going wrong with it?
Effort:
CrossTable(Week, Effort, 3)
LOAD *
FROM
XXX.xls
));
load *,
monthname(Week) as Month
Resident Effort
What is the format for your field Week when you load that into the application? It seems that week is a text field and isn't getting converted by MonthName.
You will need something like this:
load *,
MonthName(Date(Week, 'Week'sFormatHere')) as Month
MonthName(Date#(Week, 'Week'sFormatHere')) as Month
Resident Effort
Seem right. Are you getting any errors when you run the script or is just that you don't see the field Month???
Hi Sunny
I dont get any errors while running the script. The column values for Month is blank
What is the format for your field Week when you load that into the application? It seems that week is a text field and isn't getting converted by MonthName.
You will need something like this:
load *,
MonthName(Date(Week, 'Week'sFormatHere')) as Month
MonthName(Date#(Week, 'Week'sFormatHere')) as Month
Resident Effort
Hi,
Load the three coulmns in respective order how you mentioned in Cross Table()
Hi Sunindia
I didnt really know that the values get stored as text. Also referred to Handling dates and cross table
Issue seems to have got solved.
Thanks
Awesome
I am glad it worked out for you.
Best,
Sunny