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: 
Not applicable

ApplyMap command not working

Hiya,

I'm a beginner at Qlikview and have encountered a problem that is very simple.

I have created a map using 'mapping load * inline', in a way which I feel is correct.

When I try and use the 'applymap' command under the table I want to load it in,  the line of code does not get recognised (it gets underlined and nothing gets coloured).

I have followed exactly what it says in the help section in terms of writing the command, but it's not having any of it.

The text is as follows (the first 3 lines are a load statement and the fourth is the applymap):

TradesSplits: load * from [\\fsdata01\department\EmergingMarketsED\QlikView.Release\eCommerce\Sifat\QVDs\TradeSplitsRevenueDashboard.qvd] (qvd);

applymap('MapMarketSystems',Product,'Unknown system') as TradingSystem;

it doesn't recognise the last line.

Anyone have a clue as to why?

1 Solution

Accepted Solutions
sorrakis01
Specialist
Specialist

Hi,

Try this:

MapMarketSystems:

Mapping

LOAD * INLINE [

    market, system

    APAC - Asia NDF,  Fusion

    APAC - AU bonds,  ETC

    APAC - Energy,  Fusion

    APAC - NZ Bonds,  ETC

    EMEA - $ Agencies,  Fusion

    EMEA - € Agencies,  Fusion

    EMEA - Asia FX Fwds,  Fusion

    EMEA - HY Bonds,  Fusion

    EMEA - HY CDS,  Fusion

    EMEA - New Issues,  Fusion

    EMEA - PLN Bonds,  Fusion

    EMEA - RON Bonds,  Fusion

    EMEA - RON FX Fwds,  Fusion

    EMEA - Scrapbook,  Fusion

    EMEA - UST,  Fusion

    EMEA - WCLK,  ETC

    EMEA - ZAR Bonds,  Fusion

    US - Asia FX Fwds,  ETC

    US - Asia NDF,  ETC

    US - CAD IRO,  ETC

    US - CE3 FX Fwds,  ETC

    US - Loan CDS,  ETC

    US - Muni CDS,  ETC

];

Example:

LOAD market,

ApplyMap('MapMarketSystems',market,'N/D') as Fusion;

LOAD * INLINE [

    market

    APAC - Asia NDF

    APAC - AU bonds

    APAC - Energy

    APAC - NZ Bonds

    EMEA - $ Agencies

    EMEA - € Agencies

    EMEA - Asia FX Fwds

    EMEA - HY Bonds

    Example 2

    Example 3

];

Regards

View solution in original post

9 Replies
qlikviewwizard
Master II
Master II

Hi,

You do not have mapping table in the script.

Check this app.

Mapping Load QVD.qvw

Bill_Britt
Former Employee
Former Employee

Hi,

It should look like this:

Divisions_Map:
MAPPING LOAD
  DivisionID,
  DivisionName;
SQL SELECT *
FROM Divisions;

Customers:
LOAD Address,
City,
CompanyName,
ContactName,
Country,
CustomerID,
DivisionID,
applymap ('Divisions_Map', DivisionID)
as
Division,
Fax,
Phone,
PostalCode,
StateProvince;
SQL SELECT *
FROM Customers;

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
qlikviewwizard
Master II
Master II

Yes.

Not applicable
Author

Sorry forgot to mention, I had loaded a mapping table in my script. It looks like this:

MapMarketSystems:

mapping load * inline

[market, system

APAC - Asia NDF, Fusion

APAC - AU bonds, ETC

APAC - Energy, Fusion

APAC - NZ Bonds, ETC

EMEA - $ Agencies, Fusion

EMEA - € Agencies, Fusion

EMEA - Asia FX Fwds, Fusion

EMEA - HY Bonds, Fusion

EMEA - HY CDS, Fusion

EMEA - New Issues, Fusion

EMEA - PLN Bonds, Fusion

EMEA - RON Bonds, Fusion

EMEA - RON FX Fwds, Fusion

EMEA - Scrapbook, Fusion

EMEA - UST, Fusion

EMEA - WCLK, ETC

EMEA - ZAR Bonds, Fusion

US - Asia FX Fwds, ETC

US - Asia NDF, ETC

US - CAD IRO, ETC

US - CE3 FX Fwds, ETC

US - Loan CDS, ETC

US - Muni CDS, ETC

US - UST, ETC

US - UST Bills, ETC

US - UST Shorts, ETC

];

Yet when I use the 'applymap', it just doesn't load 😕

Any ideas on whether it's the mapping table or the apply command where I've gone wrong?

qlikviewwizard
Master II
Master II

Can you upload your sample file?

It will help us to fix the issue quickly.

Thank you.

sorrakis01
Specialist
Specialist

Hi,

Try this:

MapMarketSystems:

Mapping

LOAD * INLINE [

    market, system

    APAC - Asia NDF,  Fusion

    APAC - AU bonds,  ETC

    APAC - Energy,  Fusion

    APAC - NZ Bonds,  ETC

    EMEA - $ Agencies,  Fusion

    EMEA - € Agencies,  Fusion

    EMEA - Asia FX Fwds,  Fusion

    EMEA - HY Bonds,  Fusion

    EMEA - HY CDS,  Fusion

    EMEA - New Issues,  Fusion

    EMEA - PLN Bonds,  Fusion

    EMEA - RON Bonds,  Fusion

    EMEA - RON FX Fwds,  Fusion

    EMEA - Scrapbook,  Fusion

    EMEA - UST,  Fusion

    EMEA - WCLK,  ETC

    EMEA - ZAR Bonds,  Fusion

    US - Asia FX Fwds,  ETC

    US - Asia NDF,  ETC

    US - CAD IRO,  ETC

    US - CE3 FX Fwds,  ETC

    US - Loan CDS,  ETC

    US - Muni CDS,  ETC

];

Example:

LOAD market,

ApplyMap('MapMarketSystems',market,'N/D') as Fusion;

LOAD * INLINE [

    market

    APAC - Asia NDF

    APAC - AU bonds

    APAC - Energy

    APAC - NZ Bonds

    EMEA - $ Agencies

    EMEA - € Agencies

    EMEA - Asia FX Fwds

    EMEA - HY Bonds

    Example 2

    Example 3

];

Regards

jatin3001
Partner - Contributor II
Partner - Contributor II

Dear ,

In the Script First load the mapping table as:

TAble:

Mapping load * inline[

c1,c2

a,1];

table 2:

applymap('TAble',c1),

c1

from......

in such a way .(Its just an Example)

Hope it will help You!!!!!!!!!!!!!!!!!!!!!!!!

Bill_Britt
Former Employee
Former Employee

Hi,

If is a small sample with a couple of mapping loads.

A mapping table must have two fields, the first one containing comparison

values and the second the desired mapping values. The two fields must be

named, but the names have no relevance in themselves. The field names have

no connection to field names in regular input tables. When mapping tables

are used to map a certain field value or expression, that value will be compared

to the values in the first field of the mapping table. If found, the original

value will be replaced by the corresponding value in the second field of

the mapping table. If not found, no replacement is made.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Not applicable
Author

Thanks all, much appreciated. Managed to sort it by typing it this way:

TradesSplits: load *,

applymap('MapMarketSystems',Product,'Unknow system') as TradingSystem

from [\\fsdata01\department\EmergingMarketsED\QlikView.Release\eCommerce\Sifat\QVDs\TradeSplitsRevenueDashboard.qvd] (qvd);

it seems as if my mistake was very silly; I'd just omitted the comma after the load statement.

All sorted now then!