Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
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
stigchel
Partner - Master
Partner - Master

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

Hi,

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

Good luck!

Not applicable
Author

can u pls help me with the script?

stigchel
Partner - Master
Partner - Master

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);

puttemans
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);

PrashantSangle


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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂