Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
priyarane
Contributor III

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

Re: Creatin Column

Hi,

Use Inline Load;

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
datanibbler
Esteemed Contributor

Re: Creatin Column

Hi Priya,

I don't quite get it - so you want a new field (column) with two values, US and PRA?

Is there some pattern (rgd. some other field) telling you which records should have US and which should have PRA?

=> in that case, you could just do two LOADs, each with a WHERE function - and do just like you already have.

HTH

Re: Creatin Column

Not sure about your request

Maybe

US & PRA as RegApproach

priyarane
Contributor III

Re: Creatin Column

Hi Robert,

Its coming like that

RegApproach

USPRA

But I need

RegApproach

US

PRA

Its not in the Table, need to create new column


priyarane
Contributor III

Re: Creatin Column

RegApproach

US

PRA

Its not in the Table, need to create new column

With out using inline load is there any way

nishant_jadhav
New Contributor III

Re: Creatin Column

Hi Priya,

Please use below code.

TableName:

Load * inline

[

NewColumn

US,

PRA

];

priyarane
Contributor III

Re: Creatin Column

Hi Max,

Yes agreed with you. But is there any way without inline load

Not applicable

Re: Creatin Column

Hi,

I Agree with  Nishant, Priya we not sure how do you want the Columns, cause inline is the most Recommended one.

Regards.

nishant_jadhav
New Contributor III

Re: Creatin Column

Create an empty field first.

Assign PRA and USA value to it by using below function.

ValueList will simple display a list of values inside the ()


Valuelist function for Synthetic/dummy dimension


/docs/DOC-5011

Community Browser