Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a problem using Applymap to populate Jan2017 table with a field Country. Is there anything wrong with my script?
MapCountrytoPortfolio:
Mapping LOAD Portfolio,
Country
FROM
(biff, embedded labels, header is 1 lines, table is PortfolioStructure$);
Jan2017:
LOAD DAY,
TRADENBR,
ENTITYID AS Entity,
NODEID AS Portfolio,
PRODUCT_TYPE AS Product,
PRODUCT_ID AS Instrument,
STRATEGY,
COUNTERPART,
CCY,
TRADE_OCY AS [Sales Margin OCY],
SPOT_FX,
SPOT_RATE,
TRADE_LCY AS [Sales Margin LCY],
TYPE,
Month(DAY) AS Month,
Dual('Q' & Ceil(Month(DAY)/3), Ceil(Month(DAY)/3)) AS Quarter,
Year(DAY) AS Year,
Applymap('MapCountrytoPortfolio', Portfolio,'NA') as Country
FROM
(ooxml, embedded labels, table is [Sales Margin Report by Budget R]);
Hi,
Jan2017:
LOAD DAY,
TRADENBR,
ENTITYID AS Entity,
NODEID AS Portfolio,
PRODUCT_TYPE AS Product,
PRODUCT_ID AS Instrument,
STRATEGY,
COUNTERPART,
CCY,
TRADE_OCY AS [Sales Margin OCY],
SPOT_FX,
SPOT_RATE,
TRADE_LCY AS [Sales Margin LCY],
TYPE,
Month(DAY) AS Month,
Dual('Q' & Ceil(Month(DAY)/3), Ceil(Month(DAY)/3)) AS Quarter,
Year(DAY) AS Year,
Applymap('MapCountrytoPortfolio', NODEID ,'NA') as Country
FROM
(ooxml, embedded labels, table is [Sales Margin Report by Budget R]);
Regards
Doesn't look like it... are you getting an error?
Applymap('MapCountrytoPortfolio', Portfolio,'NA') as Country
Applymap('MapCountrytoPortfolio', NODEID, 'NA') as Country
Hi,
I think that if earlier the script worked correctly, need to analyze the downloadable data
Hi
What error show when you reload?
Applymap('MapCountrytoPortfolio',NODEID,'NA') as Country
try DISTINCT in Mapping Load ...
LOAD Distinct
Portfolio,
Country
FROM
(biff, embedded labels, header is 1 lines, table is PortfolioStructure$);
Hi,
Try this: change Mapping LOAD Portfolio in
Mapping LOAD NODEID
and change
Applymap('MapCountrytoPortfolio', Portfolio,'NA') as Country in
Applymap('MapCountrytoPortfolio', NODEID,'NA') as Country
Greetings,
Marcellino
HI Yaron,
Kindly use the below,
MapCountrytoPortfolio:
Mapping LOAD distinct Portfolio,
Country