Skip to main content
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)

50 Replies
matthewp
Creator III
Creator III
Author

=IF([Customer ID1] = [Customer ID2],[Customer name1],[Customer name2])

sunny_talwar

Isn't that is exactly what we are doing. Based on the Excel attached what is the output do you expect the final table to look like?

matthewp
Creator III
Creator III
Author

we are, but its splitting the graph and making the new name values null

sunny_talwar

Unless you can share a sample of your own, I am afraid, I am having trouble seeing the issue. May be Kush or someone else might have a solution for you.

I really hope you get what you are looking for

Best,

Sunny

matthewp
Creator III
Creator III
Author

Attached is my two tables example data and expected output

sunny_talwar

How is your expected output different then the one I attached here -> Re: Two tables, two id's and names, only use first name

Capture.PNG

Capture.PNG

I am unable to spot any difference, can you?

cjohnson
Partner - Creator II
Partner - Creator II

I'm not sure if I understand the issue here. Can you please elaborate with an example?

cjohnson
Partner - Creator II
Partner - Creator II

Is it just that you need to apply the same logic to quantities and dates?

diego_a_barboza
Creator
Creator

Based on this tables, is this the output you are looking for?

QV_Comm-1021293.png

Check attached file for more details.


Regards and good luck.

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