Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Assign Different value to existing value.

Hi All, I have data as follows:

DateProcessEmp nameManager Name

08-02-16

AAAP
09-02-2016AABQ
10-02-2016BBCR
10-02-2016CCDP
07-02-2016BBE

T

Now, I have two same process (AA) under two different managers (P and Q), So, I want to change one of the process to ZZ(say Process AA under P to ZZ) and Process CC under P should not change.

I want do this while loading the data.

Thanks in advance.

3 Replies
m_woolf
Master II
Master II

If([Manager Name] = 'P' and Process = 'AA','ZZ',Process) as Process,

Mark_Little
Luminary
Luminary

Hi,

As Mike suggested will fix it, but it if there is a lot of changes a mapping table may be better.

Change

Mapping LOAD * INLINE [

    ManagerProcess , Process

    PAA, ZZ

];

Load

     Date,

     ApplyMap('Change',[Manager name]&Process,Process) AS Process

     [Emp name],

     [Manager name],

FROM 'YOUR TABLE';

if you have a number of changes you can do this with out writing lots of if statements.

Mark

sathishkumar_go
Partner - Specialist
Partner - Specialist

HI Priyanka,

Try this

Test:
LOAD * INLINE [
Date,Process, Empname, ManagerName
08-02-16, AA, A, P
09-02-2016, AA, B, Q
10-02-2016, BB, C, R
10-02-2016, CC, D, P
07-02-2016, BB, E, T
]
;

New_Process:
LOAD * INLINE [
Process_T, Manager, NewProcess
AA, P, ZZ
]
;

Map_Name:
Mapping
load
Process_T &'-'&Manager as Key_Map,
NewProcess
resident New_Process;

Test1:
load
*,
applymap('Map_Name',Process &'-'&ManagerName,Process) as NewProcess
resident Test;

drop table Test;

-Sathish