Qlik Community

QlikView Documents

Documents for QlikView related information.

Brief Explanation about Apply map

Not applicable

Brief Explanation about Apply map

Hi Friends

       Hope all are doing good. The attached QVW refers Applymap breifly. It explain the functionalities about Apply map function. Hope this will helps you guys

Thanks & Regards

Nirmal

Attachments
Comments

Helpful.... If you want to know better use of applymap... Read below...

http://www.quickintelligence.co.uk/applymap-is-it-so-wrong/

MVP
MVP

Hi Nirmal,

Thanks for sharing this.  ApplyMap is perhaps my favourite of all QlikView functions, I have blogged on its use here: http://www.quickintelligence.co.uk/applymap-is-it-so-wrong/

- Steve

srinivasa1
Contributor

Simple to understand nice one.

Niru
Contributor II

Hi

will you please share the script because i am using personal edition

Regards,

Niranjan

Not applicable

A:

Mapping

Load * Inline [

ID, Name

111, Nirmal

222, Tableau

333, Cognizant

444, HP

];

B:

LOAD * Inline [

ID, Sales

111, 1000

222, 6000

888, 8000

333, 2000

444, 9000

555, 10000

];

C:

LOAD *,

ApplyMap('A',ID,'NOT MAPPED') as Applymapfield

Resident B;

DROP Table B;

Niru
Contributor II

Hi Nirmal,

In which scenario we are using applymap ,instead of left join

Any Specific reason please guide me i am learning Apply map function

Thanks & Regards

Niranjan

Not applicable

Hi Niranjan

The ApplyMap function is used for mapping any expression to a previously loaded mapping table

for example

Assume that you have one master table and one temp table

in master table you have Branch Code and Branch name is available....... and in Temp table Branchcode and Merged Branch code is available. With the help of that branch code you want to map and get the branch name. find the below example script you will get an idea.

EG:

Master:

Mapping LOAD * Inline [

Code, CompanyName

101, Ahmedabad

102, Bangalore

103, Chennai

104, Mumbai

105, Hyderabad

106, Delhi

];

Temp:

LOAD * Inline [

BranchCode, MergeCode

101000EQ, 101

102000EQ, 101

103000EQ, 101

104000EQ, 104

105000EQ, 105

106000EQ, 106

];

Temp1:

LOAD *,

left(BranchCode,3) as code,

if(left(BranchCode,3)<>MergeCode,MergeCode,left(BranchCode,3)) as NewBranch

Resident A;

DROP Table A;

Temp2:

LOAD *,

ApplyMap('Master',NewBranch,'Not Mapped') as BranchCodeNew

Resident B;

DROP Table B;

Load the above script in your application and reload..Then in front end take the table box and add the all fields. Finally you will get some Idea. Hope this will clear you

Untitled.png

Niru
Contributor II

Hi Nirmal

Thank you so much for your replay,really its help full

Thanks & Regards

Niranjan

Not applicable

Welcome

qlikview_yj
Contributor

good one

Version history
Revision #:
1 of 1
Last update:
‎01-30-2014 06:41 AM
Updated by: