Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Hi Friends I have below Sample Dataset I want to give the column names of one table by another table values brief Example is below added. Please suggest me what will be the Query?

[SalesHeader]:

LOAD [col1],

  [col2],

  [col3]

FROM [lib://Desktop/x2.xlsx]

(ooxml, embedded labels, table is Sheet1);

below is Data

col1col2col3
Sales ValueSales QtyNet Sales

[SalesData]:

LOAD ,

  ,

 

FROM [lib://Desktop/x1.xlsx]

(ooxml, no labels, table is Sheet1);

Sample Data without header now.

1234380
1244282
1254184
1264086

I want to give the header such as col1 header will be SalesHeader table first column i.e col1 value like that all.

Sales Value Sales Qty Net Sales

1234380
1244282
1254184
1264086

Is it possible friends?? please suggest me. Thanks,

Bibhuti

1 Solution

Accepted Solutions
Not applicable

Re: Hi Friends I have below Sample Dataset I want to give the column names of one table by another values Example below is added. Please suggest me what will be the Query?

Try:

[SalesData]:

LOAD

as YourColumnName1,  

  as YourColumnName2,

  as YourColumnName3

FROM [lib://Desktop/x1.xlsx]

(ooxml, no labels, table is Sheet1);

4 Replies
Not applicable

Re: Hi Friends I have below Sample Dataset I want to give the column names of one table by another values Example below is added. Please suggest me what will be the Query?

IS the Excel file your loading from have the column headers as col 1, col 2 etc with the values under them?  If so you can skip the 1st line like this,

(ooxml, embedded labels, header is 1 lines, table is Sheet1);

or

you can use the rename function with a mapping load:

FieldNameMap;

Mapping Load OldFieldName, NewFieldName From FieldNames ;

Rename Fields using FieldNameMap;

Not applicable

Re: Hi Friends I have below Sample Dataset I want to give the column names of one table by another values Example below is added. Please suggest me what will be the Query?

We can not write direct Query based on SalesHeader column name ??

Suppose I am loading SalesData table there Can it be possible to Assign column name as SalesHeader column values ??

[SalesData]:

LOAD

,   // Here I want assign column name will be SalesHeader Column value

  ,

 

FROM [lib://Desktop/x1.xlsx]

(ooxml, no labels, table is Sheet1);

Is it possible??

Not applicable

Re: Hi Friends I have below Sample Dataset I want to give the column names of one table by another values Example below is added. Please suggest me what will be the Query?

Try:

[SalesData]:

LOAD

as YourColumnName1,  

  as YourColumnName2,

  as YourColumnName3

FROM [lib://Desktop/x1.xlsx]

(ooxml, no labels, table is Sheet1);

Not applicable

Re: Hi Friends I have below Sample Dataset I want to give the column names of one table by another table values brief Example is below added. Please suggest me what will be the Query?

I am not sure I understand fully. How would you write the query to extract your data? From here I may be able to assist.

Community Browser