Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
panipat1990
Creator II
Creator II

Help

Hi,

   I am New In qlikview.....Please Help Me..

Suppose In Table one Field Contain Like Country  US,U.S.A,AMERICA,USA......IWant to all Field Value In One Format Like USA.......So Help Me Which Function I used.....Please Send Me QVW File.....

1 Solution

Accepted Solutions
tresesco
MVP
MVP

use mapping like:

map1:

mapping load * inline [

Country,Code

US,USA

U.S.A,USA

AMERICA,USA

USA,USA

];

Final:

Load 

          ApplyMap ('map1', YourCountryField ) as Country
From <>;

View solution in original post

9 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Simple thing is to use inline function like illustrated below.

load * Inline

[

Country

US

U.S.A

AMERICA

USA

];

load * Inline

[

Country,Code

US,USA

U.S.A,USA

AMERICA,USA

USA,USA

];

Now use code in front end.

Regards

ASHFAQ

manojkulkarni
Partner - Specialist II
Partner - Specialist II

You can use ApplyMap function to do this clean up. Create one Mapping table for all possible value and use it.

Or same can be done using join as well.

refer. quick applymap example

tresesco
MVP
MVP

use mapping like:

map1:

mapping load * inline [

Country,Code

US,USA

U.S.A,USA

AMERICA,USA

USA,USA

];

Final:

Load 

          ApplyMap ('map1', YourCountryField ) as Country
From <>;

MayilVahanan

Hi

Try like this

MapCountry:

Mapping Load * inline

[

CountryCode, County

USA, USA

America, USA

US, USA

];

load *, applymap('MapCountry', CountryCode, 'N/A') as CountryName inline

[

CountryCode

USA

America

US

];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

FYI....................

Not applicable

Or you can create a sample mapping table with country and codes like shown above, having one country column common. That will also help!

Not applicable

try this one load pick(match('US','U.S.A','AMERICA','USA'),'USA','USA','USA','USA') AS [Country Name], * inline [ US U.S.A AMERICA USA ];

sasiparupudi1
Master III
Master III

Hi

Please see the attachment.

Hope this helps

//Have your mappings done in a mapping table

CountryMap:

Mapping load * Inline

[

Country,COuntry_Code

US,USA

U.S.A,USA

AMERICA,USA

USA,USA

IND,India

CHN,China

U.K,UK

Aruba (Netherlands),Netherlands

];

Data1:

load ApplyMap('CountryMap',Country,'N/A') as Country,Sales

Inline

[

Country,Sales

US,1000

U.S.A,10000

AMERICA,20000

USA,4000

IND,30000

CHN,5000

U.K,1000000

Aruba (Netherlands),20000

];

sasiparupudi1
Master III
Master III

Hi

If you got your answer, please close this thread by marking the correct answer

Sasi