Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

swiftfahad
New Contributor

creating table from table

Hello Grus,

I have the location master table in my database which is like

locIDlocation
1abc
2xyz
3ghi
4stu

now i have a transaction table with the field

transaactionIDlocIDDeliveryPlaceCodeWorkingPlaceCodeamount
123465a1245000
123456b2236000

note: the value in locId, DeliveryPlaceCode and WorkingPlaceCode are refer to location master table

now i i fetch this table in to qlikview

location:

load

locID,

Location

from location.qvd;

Transaction:

load

Transaction Id,

locId,

DeliveryPlaceCode ,

WorkingPlaceCode

from xyz.qvd

link will be created between the two table with locId and I can easily find out the locationname against each locId

now,

how can I find out the location name for deliverycode and workinplacecode;

plz help

Tags (1)
1 Solution

Accepted Solutions

Re: creating table from table

As Mindaugas‌ said, it would be better to use Mapping Load, here is how the script would look like

MappingTable:

Mapping

LOAD locID,

    location

FROM

[https://community.qlik.com/thread/215298]

(html, codepage is 1252, embedded labels, table is @1);

LOAD transaactionID,

    locID,

    ApplyMap('MappingTable', locID) as Location_locID,

    DeliveryPlaceCode,

    ApplyMap('MappingTable', DeliveryPlaceCode) as Location_DeliveryPlaceCode,

    WorkingPlaceCode,

    ApplyMap('MappingTable', WorkingPlaceCode) as Location_WorkingPlaceCode,

    amount

FROM

[https://community.qlik.com/thread/215298]

(html, codepage is 1252, embedded labels, table is @2);


Capture.PNG

3 Replies
MindaugasBacius
Valued Contributor II

Re: creating table from table

While connecting location master table with transaction table use Mapping:

Mapping as an Alternative to Joining

Regarding DeliveryPlaceCode and WorkingPlaceCode your database should have the familiar master tables like Location master table.

Re: creating table from table

As Mindaugas‌ said, it would be better to use Mapping Load, here is how the script would look like

MappingTable:

Mapping

LOAD locID,

    location

FROM

[https://community.qlik.com/thread/215298]

(html, codepage is 1252, embedded labels, table is @1);

LOAD transaactionID,

    locID,

    ApplyMap('MappingTable', locID) as Location_locID,

    DeliveryPlaceCode,

    ApplyMap('MappingTable', DeliveryPlaceCode) as Location_DeliveryPlaceCode,

    WorkingPlaceCode,

    ApplyMap('MappingTable', WorkingPlaceCode) as Location_WorkingPlaceCode,

    amount

FROM

[https://community.qlik.com/thread/215298]

(html, codepage is 1252, embedded labels, table is @2);


Capture.PNG

swiftfahad
New Contributor

Re: creating table from table

thanks alot dear

Community Browser