Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Re: 2 fields to be mapped to one

have you a example what du you want?

greetings gerold

MVP
MVP

Re: 2 fields to be mapped to one

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

Re: 2 fields to be mapped to one

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 ?

ruchitanikam7
New Contributor III

Re: 2 fields to be mapped to one

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

vaibhav11
New Contributor

Re: 2 fields to be mapped to one

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

Re: 2 fields to be mapped to one

Capture.PNGCapture2.PNG

vaibhav11
New Contributor

Re: 2 fields to be mapped to one

Capture.PNGCapture2.PNG

vaibhav11
New Contributor

Re: 2 fields to be mapped to one

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

Community Browser