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: 
alibd225
Creator
Creator

Add an additional Column

i need to add an additional column with static value. i loaded data from excel by using ETS

ETS.png

12 Replies
Anonymous
Not applicable

The wizard helps you do a conditional copy of data from other columns.

If it is a static value, u should write it on your script directly.

alibd225
Creator
Creator
Author

This my script. can you help me how i add a additional column ?

CrossTable(Name, Quantity, 3)

LOAD *

FROM

[Barisal.xls]

(biff, embedded labels, table is Sheet1$, filters(

Remove(Col, Pos(Top, 1))

));

sundarakumar
Specialist II
Specialist II

CrossTable(Name, Quantity, 3)

LOAD *,

'Static_Value' as Static_field

FROM

[Barisal.xls]

(biff, embedded labels, table is Sheet1$, filters(

Remove(Col, Pos(Top, 1))

));

you can directly add the static field as shown above, if it is a numeric value single quotes is not mandatory.

Regards,

sundar

qlikmsg4u
Specialist
Specialist

CrossTable(Name, Quantity, 3)

LOAD *,

'Value' as Field_Name

FROM

[Barisal.xls]

(biff, embedded labels, table is Sheet1$, filters(

Remove(Col, Pos(Top, 1))

));

Anonymous
Not applicable

Hi Yakub,

You can create flag for assigning static value as below

CrossTable(Name, Quantity, 3)

LOAD *,

'Value' as Static_field

FROM

[Barisal.xls]

(biff, embedded labels, table is Sheet1$, filters(

Remove(Col, Pos(Top, 1))

));

alibd225
Creator
Creator
Author

Thanks both but not working this script....

sundarakumar
Specialist II
Specialist II

Pls share a sample.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this,

ABC:

CrossTable(Name, Quantity, 3)

LOAD *

FROM

[Barisal.xls]

(biff, embedded labels, table is Sheet1$, filters(

Remove(Col, Pos(Top, 1))

));

ABC1:

Load *,'Value' as New_Field Resident ABC;

Drop table ABC;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Kushal_Chawda

Try

Data:

CrossTable(Name, Quantity, 3)

LOAD *

FROM

[Barisal.xls]

(biff, embedded labels, table is Sheet1$, filters(

Remove(Col, Pos(Top, 1))

));

New:

noconcatenate

load *,

'Static_Value' as Flag

resident Data;

drop table Data;