Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Crosstable attributes

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

1 Solution

Accepted Solutions
sunny_talwar

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

View solution in original post

6 Replies
sunny_talwar

Seem right. Are you getting any errors when you run the script or is just that you don't see the field Month???

Anonymous
Not applicable
Author

Hi Sunny

I dont get any errors while running the script. The column values for Month is blank

sunny_talwar

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

hariprasadqv
Creator III
Creator III

Hi,

Load the three coulmns in respective order how you mentioned in Cross Table()

Anonymous
Not applicable
Author

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

sunny_talwar

Awesome

I am glad it worked out for you.

Best,

Sunny