Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

Mixmatch maybe?

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

Labels (1)
5 Replies
Anonymous
Not applicable

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

hemanthaanichet
Creator III
Creator III

Can you have any sample data so that i can work on it.....

stabben23
Partner - Master
Partner - Master

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.

bobbydave
Creator III
Creator III
Author

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?

bobbydave
Creator III
Creator III
Author

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?