Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.....
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 <>;
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
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
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 <>;
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
];
FYI....................
Or you can create a sample mapping table with country and codes like shown above, having one country column common. That will also help!
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 ];
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
];
Hi
If you got your answer, please close this thread by marking the correct answer
Sasi