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: 
Not applicable

Data set question: need to update columns

Hi Friends, I have  a dataset like below , whee A,B,C are column names and SalesQty,SalesValue,ReturnValue ,so on are data. Is it possible to add as column name SalesQty,SalesValue,ReturnValue  by removing column names as A,B,C in Query.

ABC
SalesQtySalesValReturnVal
101002
132004

I want to remove column name A,B,C . New dataset will be

SalesQtySalesValReturnVal
101002
132004

Is it possible in qliksense by writing query?

5 Replies
sinanozdemir
Specialist III
Specialist III

Hi,

You can actually "-" and "+" buttons to get rid of the extra headers:

Capture.PNG

As you can see Header size: 2 did the trick:

Capture.PNG

Hope this helps.

Other useful links by Sinan:

Handling Metadata in QlikView

QlikView and Python Integration

QlikView Automation Series – Unzip & Load Excel Files

Not applicable
Author

Thanks Dear,

but I am merging multiple sql files which is may not possible unselect or select in drop down list.

Is it possible to do in query??

Only I want to assign SalesQty,SalesValue.,ReturnVal as column name in Query.

Thanks,

Bibhuti

sinanozdemir
Specialist III
Specialist III

I am not quite sure about your data, but you can try something like the below:

Capture.PNG

You can use IsNum() function to get rid of string/text values and then rename the columns as you would like.

Hope this helps.

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

Try this.. this will automatically does it.

ColumnNames: //Just read Header and first row --- You can use "RowNum() in SQL instead of First

first 1

LOAD 1 as XYZ, //This is mandatory to work with crosstable -- just add this with rest of hte columns

  A,

    B,

    C  

FROM

test.xlsx

(ooxml, embedded labels, table is Sheet3);

Temp:

CrossTable(From, To)

LOAD XYZ,

    A,

    B,

    C

Resident ColumnNames;

Drop Field XYZ;

RenameFields:

Mapping Load * Resident Temp;

Drop Tables Temp,ColumnNames;

Data:

LOAD A,

    B,

    C

FROM

test.xlsx

(ooxml, embedded labels, table is Sheet3) where RecNo()>1; // Dont read the first row as it has column names

RENAME Fields using RenameFields; //This will rename old column names with new one

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

A as SalesQty,

B as SalesVal,

C as ReturnVal

FROM DataSource

WHERE A <> 'SalesQty';

Hope this helps you.

Regards,

Jagan.