Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a Mapping table:
MapGMSScheme:
Mapping LOAD
COUNTRY_CD & '-' & AGENT & '-' & Scheme_SDB as %GMS,
PROD_NAME
FROM
[$(vMapping)\GMS_Scheme.xlsx]
(ooxml, embedded labels, table is GMS_Schemes);
I then have a Policy table
PolicySummary:
Load COUNTRY_CODE & '-' & ACC_PERIOD & '-' & SCHEME&MEASURE_TYPE as %Product_detail,
COUNTRY_CODE,
AGENT_NAME,
PRODUCT_TYPE as PRODUCT_TYPE_SUM,
PRODUCT as PRODUCT_SUM,
PRODUCT_NAME as PRODUCT_NAME_SUM,
SCHEME as SCHEME_SUM,
MixMatch(ApplyMap('MapGMSScheme', COUNTRY_CODE & '-' & AGENT_NAME & '-' & SCHEME, 'NONE'), 'GMS',
if(COUNTRY_CODE & '-' & AGENT_NAME & '-' &
'Non-GMS') as %GMS
FROM
[$(vQVDPath)\POL_DASH_DTLS.qvd]
(qvd);
and then a KeyTable
What I am trying to achieve is to compare the COUNTRY_CD & '-' & AGENT & '-' & Scheme_SDB as %GMS, from the mapping table with the
COUNTRY_CD & '-' & AGENT_NAME & '-' & SCHEME from the Policy Table.
If matching, it says 'GMS', if not, to say 'Non-GMS'
Help appreciated
Hi,
I'm not sure if this is what you want,
IF(ApplyMap('MapGMSScheme', COUNTRY_CODE & '-' & AGENT_NAME & '-' & SCHEME, 'NONE') = 'NONE', 'Non-GMS', 'GMS')
this condition will get the value from the mapping table, if it's none as you have set above, it will output Non-GMS else GMS
Can you have any sample data so that i can work on it.....
Hi David,
try With this:
IF(ApplyMap('MapGMSScheme', COUNTRY_CODE & '-' & AGENT_NAME & '-' & SCHEME, 'NONE') =COUNTRY_CD & '-' & AGENT_NAME & '-' & SCHEME ,'GMS','Non-GMS') as %GMS
Use above solution from Yddonna, this is not working.
i see what you are doing but from
PolicySummary:
Load COUNTRY_CODE & '-' & ACC_PERIOD & '-' & SCHEME&MEASURE_TYPE as %Product_detail,
COUNTRY_CODE,
AGENT_NAME,
PRODUCT_TYPE as PRODUCT_TYPE_SUM,
PRODUCT as PRODUCT_SUM,
PRODUCT_NAME as PRODUCT_NAME_SUM,
SCHEME as SCHEME_SUM,
I want to look in the above table and then see if COUNTRY_CD & '-' & AGENT & '-' & Scheme_SDB are the same as what is in my mapping table, to categorise the matching ones as GMS, else Non-GMS.
Would your expression not just return Non-GMS?
i see what you are doing but from
PolicySummary:
Load COUNTRY_CODE & '-' & ACC_PERIOD & '-' & SCHEME&MEASURE_TYPE as %Product_detail,
COUNTRY_CODE,
AGENT_NAME,
PRODUCT_TYPE as PRODUCT_TYPE_SUM,
PRODUCT as PRODUCT_SUM,
PRODUCT_NAME as PRODUCT_NAME_SUM,
SCHEME as SCHEME_SUM,
I want to look in the above table and then see if COUNTRY_CD & '-' & AGENT & '-' & Scheme_SDB are the same as what is in my mapping table, to categorise the matching ones as GMS, else Non-GMS.
Would your expression not just return Non-GMS?