Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

ApplyMap()

I have a table. I am not sure whether i need to map but...

GMS:

Mapping Load

     COUNTRY & '-' & AGENT_ID & '-' & PROD_ID       as %GMS,

     Client

From ......

In my mapping excel table, i have

Client    COUNTRY      AGENT_ID     PROD_ID

GMS         DE                 100                  1A

GMS         DE                 101                  2A

GMS         CO                102                  3A

GMS         IE                  103                  4A

PolicyTable:

LOAD

  COUNTRY_CD   as COUNTRY,

  AGENT                as AGENT_ID,

  PROD                 as PROD_ID

From......

The Policy Table QVD looks something like

COUNTRY      AGENT_ID     PROD_ID

UK                 100                  1A

DE                 101                  2A

CO                102                  3A

FR                  103                 4A

What I want to achieve is

if any of the mappings are in the Policy table, to say that they are GMS.

If they are not in the Policy Table, they are called Non-GMS.

So I did the following in the KeyTable.

PolicyTable:

LOAD

  COUNTRY_CD   as COUNTRY,

  AGENT                as AGENT_ID,

  PROD                 as PROD_ID

From......

KeyTable:

Load

  COUNTRY,

  AGENT_ID,

  PROD_ID,

  ApplyMap('GMS', %GMS, 'Non-GMS')  as Result

Resident PolicyTable;

   Can anyone tell me what i am doing wrong?

1 Solution

Accepted Solutions
hector_munoz
Specialist
Specialist

Hi,

Change this:

KeyTable:

Load

  COUNTRY,

  AGENT_ID,

  PROD_ID,

  ApplyMap('GMS', COUNTRY & '-' & AGENT_ID & '-' & PROD_ID, 'Non-GMS')  as Result

Resident PolicyTable;

Regards,

H

View solution in original post

2 Replies
hector_munoz
Specialist
Specialist

Hi,

Change this:

KeyTable:

Load

  COUNTRY,

  AGENT_ID,

  PROD_ID,

  ApplyMap('GMS', COUNTRY & '-' & AGENT_ID & '-' & PROD_ID, 'Non-GMS')  as Result

Resident PolicyTable;

Regards,

H

View solution in original post

bobbydave
Creator III
Creator III
Author

Thanks.Working now