Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mapping


Hi,

I am using the following logic and need to get Branch and Region. I tried to use Maps but only two coloumns logic can be used in it. Here, I have to use four coloumns logic if I want to get Branch or Region. Any idea how can resolve this issue?

NSCCREATED_BY_STAFF_IDSrce_NameBranchRegion
937452 Tuam RoadMidwest
937436 Newcastle RoadMidwest
930148 CastletroyMidwest
937401 SalthillMidwest
937150 TuamNorth_West
936138 MacroomSouth_West
934194 Western RoadCork_Central
930105 DirectDirect
93010510000 Online - Internet BankingOnline - Internet Banking
930105 InternetOnline - WebOnline - Web
22 Replies
Not applicable
Author

Really appreciate your help but by using the following code it gives me as attached.

 

Data:

 

LOAD

Application_Id

,  

Originating_NSC

,

 

Originating_User_Id

,

 

Source

,

 

if

(Originating_NSC= '930105', if(Originating_User_Id = '58900', 'Online - Internet Banking' , if(Source = 'INTERNET' , 'Online - Web' ,

 

if

(Originating_User_Id <> '58900', 'Direct', 'Unknown Non-Branch'))),

 

applyMap

( 'MapBranch',Originating_NSC),'Unknown Branch')) as Branch,

 

if

(Originating_NSC= '930105', if(Originating_User_Id = '58900','Online - Internet Banking' , if(Source = 'INTERNET' , 'Online - Web' ,

 

if

(Originating_User_Id <> '58900', 'Direct', 'Unknown Non-Branch'))),

 

ApplyMap

( 'MapRegion',Originating_NSC,'Unknown Region')) as

Region

 

FROM

 

 

(

biff, embedded labels, table is Applications$);

 

Temp:

 

LOAD

Originating_NSC

,  

Originating_User_Id

,

 

Source

,

 

Trim

(Branch) as Branch,

 

Trim

(Region) as Region

 

FROM

 

 

(

ooxml, embedded labels, table is Sheet1);

 

MapBranchTmp:

 

Load

Originating_NSC

as

TmpNSC

,  

Branch

as

TmpBranch

 

Resident

Temp;

 

MapRegionTmp:

 

Load

Originating_NSC

as

TmpNSC

,  

Region

as

TmpRegion

 

resident

Temp;

 

MapBranch:

 

Mapping

Load

 

Originating_NSC

,

 

Branch

 

Resident

Temp;

 

MapRegion:

 

Mapping

Load

 

Originating_NSC

,

 

Region

 

resident

Temp;

 

drop

table

Temp;

Roop
Specialist
Specialist

Your Mapping Loads need to be before the main data load and then it should work as the ApplyMap statements need to look up from a table that already exists

Not applicable
Author

Really appreicate your help Rupert. Finally it worked. Thanks