Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load fields containing a date

Hello,

I want to load a table whose field names contain a date.

There are 24 fields whith date which gives the history of the last 2 years.

The name of the table contains the max date : table_201808

data:

Load

"Code EAN" as "Code CIP 13",

"Laboratoire (constant)",

"UN 09/2016",

    "UN 10/2016",

    "UN 11/2016",

    "UN 12/2016",

    "UN 01/2017",

    "UN 02/2017",

    "UN 03/2017",

    "UN 04/2017",

    "UN 05/2017",

    "UN 06/2017",

    "UN 07/2017",

    "UN 08/2017",

    "UN 09/2017",

    "UN 10/2017",

    "UN 11/2017",

    "UN 12/2017",

    "UN 01/2018",

    "UN 02/2018",

    "UN 03/2018",

    "UN 04/2018",

    "UN 05/2018",

    "UN 06/2018",

    "UN 07/2018",

    "UN 08/2018",

FROM table_201808;

Thank you for your help

Johanna

1 Solution

Accepted Solutions
MarcoWedel

just replace your fields with * like this:

table1:

CrossTable(Dates, Volumes)

LOAD * FROM [https://community.qlik.com/servlet/JiveServlet/download/1561299-341498/test%20201808.xlsx] (ooxml, embedded labels, table is Sheet1);

View solution in original post

8 Replies
MarcoWedel

Do you have a question?

Anonymous
Not applicable
Author

HI Marco,

I want to automate the loading of this table whose fields date 'UN MM / YYYY' will change every month, since they correspond to the last 24 months preceding the date being on the name of the file.

MarcoWedel

please post some sample data and your expected result.

Anonymous
Not applicable
Author

Hi Marco,

here an example of a table, I want to automate the loading of this table whose date fields will change every month according to the date present on the name on the file, as explained above

MarcoWedel

Hi,

maybe one solution might be:

QlikCommunity_Thread_317216_Pic1.JPG

table1:

LOAD * FROM [https://community.qlik.com/servlet/JiveServlet/download/1561299-341498/test%20201808.xlsx] (ooxml, embedded labels, table is Sheet1);

hope this helps

regards

Marco

Anonymous
Not applicable
Author

Thanks for that answer indeed I did not think about it.


I have a last question.
In case I want to make a Cross table how to use the LOAD *?


Here is my script :


Directory;

CrossTable(Dates, Volumes)

LOAD [Laboratoire (constant)],

     [UN 10/2016],

     [UN 11/2016],

     [UN 12/2016],

     [UN 01/2017],

     [UN 02/2017],

     [UN 03/2017],

     [UN 04/2017],

     [UN 05/2017],

     [UN 06/2017],

     [UN 07/2017],

     [UN 08/2017],

     [UN 09/2017],

     [UN 10/2017],

     [UN 11/2017],

     [UN 12/2017],

     [UN 01/2018],

     [UN 02/2018],

     [UN 03/2018],

     [UN 04/2018],

     [UN 05/2018],

     [UN 06/2018],

     [UN 07/2018],

     [UN 08/2018]

FROM

[..\Downloads\test 201808.xlsx]

(ooxml, embedded labels, table is Sheet1);

Thank you

MarcoWedel

just replace your fields with * like this:

table1:

CrossTable(Dates, Volumes)

LOAD * FROM [https://community.qlik.com/servlet/JiveServlet/download/1561299-341498/test%20201808.xlsx] (ooxml, embedded labels, table is Sheet1);

Anonymous
Not applicable
Author

‌Thank you Marco for your help!!