Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
swiftfahad
Contributor III
Contributor III

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

1 Solution

Accepted Solutions
sunny_talwar

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

View solution in original post

3 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

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.

sunny_talwar

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
Contributor III
Contributor III
Author

thanks alot dear