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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

Linking Fields

Hi

have issue

i have concatenated 1 & 2  tables, as they have similar fields , except 1..

Table 1 - Orders

Table 2 - Delivery

Table 1 - Department - example Catering

Table 2 - Dept - example  CAT

I need to link these but having an issue

i have left join a Table 3- DepartmentLink

Department - example Catering

DeptCode as Dept - example  CAT



is there a way of if CAT is found rename as Catering so a link is made?

please help

1 Solution

Accepted Solutions
maxgro
MVP
MVP

do you want to change the value of a field when the value is CAT?

if yes

load

     ......,

     if(originalfield='CAT', 'Catering', originalfield) as originalfield

     ....

View solution in original post

5 Replies
maxgro
MVP
MVP

do you want to change the value of a field when the value is CAT?

if yes

load

     ......,

     if(originalfield='CAT', 'Catering', originalfield) as originalfield

     ....

reddy-s
Master II
Master II

Hi Joanna,

Can you attach a sample file so that it would be easy to figure the issue and solve it?

Not applicable

Have seen something about "ApplyMap" - perhaps this would be helpful?

Afraid I haven't used it before though!

alextimofeyev
Partner - Creator II
Partner - Creator II

Add something like this in the beginning of your data load script:

DeptMap:

mapping LOAD * Inline [

OldValue,NewValue

CAT,Catering

SMTH,Something Else];



And then before the script that loads Delivery table:


Map "Dept" using 'DeptMap';

joeybird
Creator III
Creator III
Author


This worked brill but had to make small amendment

if(Dept='CAT', 'Catering', Dept) as Department

thanx team

Kind Regards