Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

Two tables, two id's and names, only use first name

I have the following load in tab 1 i have

LOAD

SIAA.C_ID as [Customer ID],

SIAA.C_NAME as [Customer name]

FROM

[$(vDetailsQVDDirectory)\SIAA.qvd]

(qvd);

Then in tab 2 i have

PreIT:

Concatenate

LOAD

[Customer ID],

[Customer name]

FROM

[$(vDetailsQVDDirectory)\CTA.qvd]

(qvd);

What i want is if there is a matching Customer ID in both tabs i want it to only use the name from tab 1 (SIAA.C_NAME)

1 Solution

Accepted Solutions
sunny_talwar

Can you reload the application with this code?

MappingName:

Mapping

LOAD SalesInvAndAccruals.CUSTOMER_ID,

  SalesInvAndAccruals.CUST_NAME

FROM

[$(vDetailsQVDDirectory)\SalesInvAndAccruals.qvd]

(qvd);

Concatenate (Details)

LOAD [Year period],

    Date(Month,'MMM-YY') as [Month],

    Year,

    Period,

   [Customer ID],

    ApplyMap('MappingName', [Customer ID], [Customer name]) AS [Customer name],

See if this fixes the issue. You should now need just two straight dimensions

1) Year Period

2) Customer Name

View solution in original post

50 Replies
sunny_talwar

Try it with Where not Exist statement:

LOAD

SIAA.C_ID as [Customer ID],

SIAA.C_NAME as [Customer name]

FROM

[$(vDetailsQVDDirectory)\SIAA.qvd]

(qvd);

Then in tab 2 i have

PreIT:

Concatenate

LOAD

[Customer ID],

[Customer name]

FROM

[$(vDetailsQVDDirectory)\CTA.qvd]

(qvd)

Where not Exists([Customer ID]);

Chanty4u
MVP
MVP

just add

last line as

where not exists([Customer ID]);

Chanty4u
MVP
MVP

ohhh ur tooo fast man...

missing  parenthesis in ur stmnt

Where not Exists([Customer ID]);

sunny_talwar

Thanks for pointing out. Fixed now

matthewp
Creator III
Creator III
Author

This then doesnt load any of the data from the second table

sunny_talwar

Are you sure there are Customer ID in the second load which don't match with the Customer ID from the first file?

matthewp
Creator III
Creator III
Author

i mean the other data ( i didnt list) in the second table doesnt load.

i have a graph that shows data and is split by time on the bottom.

the second table is data from 2005 - 2010 and the first tab is 2010 onward

what was happening was the graph line is splitting into two as there from two tables

i want it to be one continuous line if the ID's in both tables match.

the issue is that the name might have changed in both tables but the IDs are the same.

sunny_talwar

You will have to rename the fields to be the same when you concatenate them. I think that is the reason you are not seeing them as one line. I don't know how many fields you have, but this should be a one time effort.

Kushal_Chawda

try join, instead of concatenate