Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to import dates as column headers?

Hi,

QlikSense Desktop 3.1 SR6: I'm trying to import an Excel file (.xlsx) in QlikSense that uses the first row for column headers. Some of them have a date in them formated as month-year ex. may-16.  (The rest of the column has numbers as data, just the first row has a date in it.) Importing it in QlikSense it is interpreted as a number not as a date, ex. 41275 for dicember-13. I tried to play with the importing script by using the date() function, ex. date(41275, 'MM-YY') as 41275 (as suggested in replyes to similar questions), but it turns that this make QlikSense treat the data of the full column, not just the first row/header as dates. The only things that I found to work properly is by modifying the excel file by changing the first row in text, or by modifying the script with the as function, ex. 41275 as 'dicember-13', and so on for every column header tha has a date in it.

Is there any other automated way to achieve this?

Thank you in advance.

2 Replies
swuehl
MVP
MVP

It may not be a direct answer to your question, but it's usually better to transform the columns for each date into two fields, one defining the date values, one the data values. In other words, transform your table from a cross table to a straight table. You can use the CROSSTABLE LOAD prefix for this:

The Crosstable Load

Then it's also easy to format your date values like you want (you may need another resident LOAD of your transformed table to interpret the date values as numbers and format as you like):

Re: Date format issue

Not applicable
Author

Thank you very much. I'll try to figure out how to aply to my case.