Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

joeybird
Contributor II

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
MVP
MVP

Re: Linking Fields

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

     ....

5 Replies
MVP
MVP

Re: Linking Fields

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

     ....

reddys310
Honored Contributor II

Re: Linking Fields

Hi Joanna,

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

Not applicable

Re: Linking Fields

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

Afraid I haven't used it before though!

alextimofeyev
Contributor II

Re: Linking Fields

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
Contributor II

Re: Linking Fields


This worked brill but had to make small amendment

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

thanx team

Kind Regards