Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Nils9
Contributor II
Contributor II

add a row header for a table while while loading data

Hi All,

I have several tables that i would like to load, but there are no headers to it, as attached sample.

The first column(A1, A2,A3..) being the field, and the rest are the months starting from Jan to Dec and then moving on next year.

I want the highlighted two rows to be added as row headers. Can someone please help?

I will then be converting it into a straight table for further analysis of data.

Manually entering it in excel would have been the easiest solution, but unfortunately, the excel file is the main source and cant be altered.

I really appreciate your help, thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
justISO
Specialist
Specialist

Hi, I doubt that it is possible to have 2 rows as a header, but when you are loading this excel, mark 'No field names' as 'Filed names'

justISO_0-1662630434663.png

and name header with 'as' as you like:

LOAD
A AS [2020 Jan],
B AS [2020 Feb],
C AS [2020 Mrz],
D ...

View solution in original post

3 Replies
justISO
Specialist
Specialist

Hi, I doubt that it is possible to have 2 rows as a header, but when you are loading this excel, mark 'No field names' as 'Filed names'

justISO_0-1662630434663.png

and name header with 'as' as you like:

LOAD
A AS [2020 Jan],
B AS [2020 Feb],
C AS [2020 Mrz],
D ...

Or
MVP
MVP

You could load the data as-is, then loop through the columns. For each one, you would peek at the next-to-last and last row, concatenate the result into a variable, and then rename the column to that variable's result.

Nils9
Contributor II
Contributor II
Author

Is it possible to have Month and year auto populated? Because the number of columns could differ depending on will which month we have the data.