Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vaibhav11
Contributor
Contributor

2 fields to be mapped to one

i have 2 fields having similar values(ship to adress and bill to adress ) in Sales table .

i have to connect it with only one field that is adressID in adress table.. how can i achieve it.

Both shiptoadress and bill to adress  have same kind of values that are all present in adressID

8 Replies
gerry_hdm
Creator II
Creator II

have you a example what du you want?

greetings gerold

petter
Partner - Champion III
Partner - Champion III

You have two options:

  1. Create a table called AddressType with three fields: addressID.Sales, addressType,addressID. The first field you have to have in the Sales table too - that way you get a key shared between the Sales and AddressType tables. The lastfield in the AddressType table will have to be in the Address table so you get a key shared between the AddressType and Address tables. In the field addressType you will have only two possible values: 'ShipTo' or 'BillTo' which identify what kind of address row you have in the AddressType table.

    The concept is similar to what Henric Cronström has descibed in his article about "Canonical Date". So in your case we could call this "Canonical Addresses". Look here: Canonical Date

  2. Create two separate tables named ShipToAddresses and BillToAddresses and you have two separate ids for each of them.
gerry_hdm
Creator II
Creator II

You can duplicate you ID Field  as a ID2  when you selcion the ship to adress and bill to adress )

are the values identical  ship to adress and bill to adress ?

Anonymous
Not applicable

Hey,You can try ApplyMap() and merge them into one field

vaibhav11
Contributor
Contributor
Author

there are various other fields in adress table and also the sales table is  having many rows, if i make them as  two different tables , and concatenate them, they will result in double the rows.  adress table has all values of adresses and is a primary key.

shiptoadress ID and billtoadressID may be same or different but all its values are present in adressID column in adress table

vaibhav11
Contributor
Contributor
Author

Capture.PNGCapture2.PNG

vaibhav11
Contributor
Contributor
Author

Capture.PNGCapture2.PNG

vaibhav11
Contributor
Contributor
Author

the scenario is a bit different here. The shipto address and billto address have IDs that are all present in AddressID field of the Address table.

I just want  all the values (may be same or different) to be mapped to AddressID .There are some values  presnt in shiptoadress which are not present in billtoaddress and vice versa