Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
priyarane
Specialist
Specialist

Creatin Column

Hi Experts,

How to create a new column with 2 Fieds like below.

Tab:

Name,

Dept

From

C:Tab\Tab.qvd;

I want the new column needs to add with 2 fields

Like -

RegApproach(New Column)

US

PRA

I tried like below

Tab:

Name,

Dept,

'US' as RegApproach

From

C:Tab\Tab.qvd;

But I can't add PRA field

22 Replies
robert_mika
Master III
Master III

Is this coming from your data source like this an you need to split USPRA?

Can you attached your file/data?

priyarane
Specialist
Specialist
Author

No Data in source,

Its just like flag, need to add additional Column with US and PRA

RegApproach

US

PRA

Is there any way without Inline load

Not applicable

Hi Use,

Load

Inlinr

[

RegApproach

US,

PRA

];

Im, not sure if that what you want.

Not applicable

Try this if this ok 4 u

Tab:

'US' as RegApproach

From

C:Tab\Tab.qvd;

concatenate(Tab)

Load

'PRA' as RegApproach

resident Tab;

priyarane
Specialist
Specialist
Author

Hi Harsha,

I have done the same as below.  No concatenate required as same field. But I just trying to get in one table.

'US' as RegApproach

From

C:Tab\Tab.qvd;

Inline Load as below

RegApproach

PRA

Not applicable

Yes Noconcatenate required but if you share your purpose of doing appending without above methods may be it will help for alternate approach...

awhitfield
Partner - Champion
Partner - Champion

Hi Priya,

it looks like you want to create 1 new column that contains 2 new values, but these need to be added to existing records in the table TAB, have a look at the example attached to see if it helps.

Regards Andy

priyarane
Specialist
Specialist
Author

Hi Andrew,  I can't open QVW. Could you please keep the script part here.
awhitfield
Partner - Champion
Partner - Champion

Here you go:

TAB:
LOAD * Inline [
Name, Dept, From
Name1,Dept1,From1
Name2,Dept2,From1
Name3,Dept3,From1
Name4,Dept4,From1

]
;

Join (TAB)
Reg:
LOAD * Inline [
Name,RegApproach
Name1,US
Name2,PRA
Name3,US
Name4,PRA
]
;

Andy

priyarane
Specialist
Specialist
Author

Same way I have done...

Just checking without inline load can we create column in the same table. but its good