Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
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;
Yes.
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?
Can you upload your sample file?
It will help us to fix the issue quickly.
Thank you.
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
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!!!!!!!!!!!!!!!!!!!!!!!!
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
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!