Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

replacing the name in a table

Hi Experts,

i have the following table loaded from a qvd.

Target:

LOAD BDM,

     [Branch Name],

     LBDM,

     TGT_YEAR,

    

FROM

QVD\TGT_YEAR.qvd

(qvd);

in the LBDM field, i have a list of names.

i need to replace the name Nick by Chris.

how can i do that.

any script changes?

please help me in this regard.

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

You can use the ApplyMap function (see help), something like this

MyMap:

mapping load * inline [From,To

'Nick','Chris'

];

Target:

LOAD BDM,

     [Branch Name],

     Applymap('MyMap',LBDM,LBDM) as LBDM,

     TGT_YEAR,

   

FROM

QVD\TGT_YEAR.qvd

(qvd);

View solution in original post

5 Replies
Highlighted
Not applicable

Hi,

This could easy be solved by using Applymap on the LBDM field to replace "Nick" with "Chris".

Good luck!

Highlighted
Not applicable

can u pls help me with the script?

Highlighted
Partner
Partner

You can use the ApplyMap function (see help), something like this

MyMap:

mapping load * inline [From,To

'Nick','Chris'

];

Target:

LOAD BDM,

     [Branch Name],

     Applymap('MyMap',LBDM,LBDM) as LBDM,

     TGT_YEAR,

   

FROM

QVD\TGT_YEAR.qvd

(qvd);

View solution in original post

Highlighted
Specialist
Specialist

Map_Name:

MAPPING LOAD * Inline

[Name, Newname

Nick, Chris];

Target:

LOAD BDM,

     [Branch Name],

    Applymap('Map_Name', LBDM) as LBDM,

     TGT_YEAR,

   

FROM

QVD\TGT_YEAR.qvd

(qvd);

Highlighted


Hi,

If you want to replace only one name

then use if(wlidmatch(LBDM,'Nick'),'Chris',LBDM) as Ne_LBDM

else use ApplyName()

Regards

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