Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
VishalWaghole
Specialist II
Specialist II

Mapping Table

Hi friends,

Please can anybody tell me Mapping Table, I try it by my Best but Yet i cant understand why we use mapping table in qlikview and also how to implement it...

So plz help me ragarding with Mapping Table

Thanks,

Vishal Waghole

8 Replies
Not applicable

example

MAP:

Mapping

LOAD * INLINE [

    CODICE, descr

    1, ciao

    2, stella

    5, pippo

]
;







TABELLA:

LOAD

applymap('MAP',CODICE) as CODICE;

LOAD * INLINE [

    CODICE

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

]
;

Not applicable

Execute this code and i think that tou understand the mapping use

VishalWaghole
Specialist II
Specialist II
Author

Hi marcomasin

Thanks for rpl

but if i have following data in my inline database, And meaning of this all US, Us, U.S are same but at the time of fetching data i want show that US and all values realated to US, Us and U.S. so how we can use applymap function.

Data:

Load * Inline [

Country, Sales

US, 100

Us, 200

U.S., 300

INDIA, 400

PAK,250

];

Thanks,

Vishal

Or
MVP
MVP

Your issue doesn't seem to have anything to do with mapping load - you need to clean up your data. In this case, you'd probably use

Purgechar(Upper(Country),'.')

In order to remove the excess periods and make everything uppercase.

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Vishal,

I have written a blog post on ApplyMap which has a number of examples of its use: http://bit.ly/kQcAZ5

If your data only has those values in you may want to do something simpler like:

Load

     Upper(replace(Country, '.', '')) as Country,

     Sales

If you want to use an applymap, which will give you far more flexibility, it will be something like:

Map_Country:

MAPPING LOAD

  Country,CountryNew

INLINE [

Country,CountryNew

US,US

Us,US

U.S.US

U.S,US

];

LOAD

  ApplyMap('Map_Country', Country) as Country,

  Sales

This will replace all the flavours of U.S. with one consistent name and leave all other names the same.  If you want to replace other names you can add them to your mapping table.

Hope that helps.

Steve

http://www.quickintelligence.co.uk/

Not applicable

is it possible to create a mapping table outside the script, directly using QV objects ?

thanks in advance

praveenak
Partner - Contributor II
Partner - Contributor II

Hi Steve,

If in case am not aware of all the list of flavours of U.S., how can I identify them to use them in the mapping table like in your example?

Thanks,

Praveena

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You don't need to worry about all the possible permutations of the United States, only the ones that exist in your data.  Do a search for any countries that start with U, and see how many of those would appear to be the US.  You can then collect all of those in a spreadsheet or INLINE load.


The tricky part is working out which permutations you have not yet seen in your data, but may arrive.  Sadly there is no way of second guessing that.


Steve