Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
gustavofred
Contributor II
Contributor II

Conntecting the calendar week to a crosstable with dates

gustavofred_0-1614925050636.png

Hello i have a crosstable lookinkg like this. i got a value connected to a location on each date. how can i connect the calendar week / week number (like the date 02.01.2021 would get the number 1, because its in the first week of the year) to each date? is there some way to "iterate" over the variable names, to do something like 

calendar week = week([22.2.2021]), but for all imported dates?

my Crosstable import looking like this:

Directory;
CrossTable(date, *value*)
LOAD location,
[22.2.2021],
[23.2.2021],
[24.2.2021],
[25.2.2021],
[26.2.2021],
.......more dates

FROM
[***.xlsx]
(ooxml, embedded labels, table is Sheet0);

 

 

3 Replies
KHSDM
Creator III
Creator III

Try use LOAD * instead of specifying the column name. But this is assuming that the order of the columns is fixed.

gustavofred
Contributor II
Contributor II
Author

thanks, thats helping my code look cleaner 😄

Any idea on how to solve my problem?

KHSDM
Creator III
Creator III

If you want to get the week number, then use the week function on the date to get the week.

week([Date])

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFun...

You probably need to do it using resident load after the crosstable.