Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

trishita
Contributor III

Problem with mapping load, map id not found

I need to map NIFuelType of general information with FUELTYPE of Summary table because they both contain the same field.I run and found some error that map id is not found..if someone can take care of it..This is my code below

MAP1:

//MAPPING

LOAD *,

  //SURVEYID,

if(WildMatch([FUEL_TYPE], 'DM*') and SULPHUR_CONTENT >.01,'HSDO', //// IF FUEL TYPE BEGINS WITH DM AND HAS SULPHUR CONTENT GREATER THAN =.01,IT SHOULD BE MAPPED TO HSDO

if(WildMatch([FUEL_TYPE], 'DM*') and SULPHUR_CONTENT <.01,'LSDO',  // IF FUEL TYPE BEGINS WITH DM AND HAS SULPHUR CONTENT GREATER THAN =.01,IT SHOULD BE MAPPED TO LSDO

if(WildMatch([FUEL_TYPE], 'RM*') and SULPHUR_CONTENT >.01,'HSFO',  // IF FUEL TYPE BEGINS WITH RM AND HAS SULPHUR CONTENT GREATER THAN .01,IT SHOULD BE MAPPED TO HSFO

if(WildMatch([FUEL_TYPE], 'RM*') and SULPHUR_CONTENT <.01 ,'ULSFO')))) // IF FUEL TYPE BEGINS WITH RM AND HAS SULPHUR CONTENT LESSER THAN .01,IT SHOULD BE MAPPED TO ULSFO

   as   NIFuelType

Resident General_Information;

drop Table General_Information;

RENAME Table MAP1 to General_Information; 

resultmap:

mapping Load

SURVEY_ID, NIFuelType

   

    FROM

[\\ww.hl.lan\HH1\Groups\RHH0T432 - ROB project\14 - QlikView\COMPASS BIAC\RoB - QDF structure 01\QlikViewStorage\SourceDocuments\10.Operations\3.Remaining On Board\2.QVD\mo_bun_sur_survey_view.qvd]

(qvd);

DATA:

Load *,

// "Fuel Type",

      applymap('resultmap',SURVEY_ID) as FUEL_TYPE

       FROM

[$(vG.QVDPath)MO_BUN_SUR_OIL_SUMMARY_VIEW.qvd]

(qvd)

     

// Resident Summary;

//drop Table Summary;

//RENAME Table Data to Summary; 

1 Solution

Accepted Solutions
Partner
Partner

Re: Problem with mapping load, map id not found

Let me know if it's solve your problem  

4 Replies
Partner
Partner

Re: Problem with mapping load, map id not found

Hi TRIHITA,

try this:

MAP1:

LOAD *,

if(WildMatch([FUEL_TYPE], 'DM*') and SULPHUR_CONTENT >.01,'HSDO',

if(WildMatch([FUEL_TYPE], 'DM*') and SULPHUR_CONTENT <.01,'LSDO',

if(WildMatch([FUEL_TYPE], 'RM*') and SULPHUR_CONTENT >.01,'HSFO', 

if(WildMatch([FUEL_TYPE], 'RM*') and SULPHUR_CONTENT <.01 ,'ULSFO','NOTYPE'))))  as   NIFuelType

Resident General_Information;

store MAP1 into 'your lib path\map1.qvd';

drop Table General_Information;

RENAME Table MAP1 to General_Information;

resultmap:

mapping Load

SURVEY_ID,

    NIFuelType

    FROM

'your lib path\map1.qvd'(qvd);

DATA:

Load *,

      applymap('resultmap',SURVEY_ID,'No_Fuel_Type') as FUEL_TYPE

       FROM

[$(vG.QVDPath)MO_BUN_SUR_OIL_SUMMARY_VIEW.qvd]

(qvd);

Partner
Partner

Re: Problem with mapping load, map id not found

Let me know if it's solve your problem  

trishita
Contributor III

Re: Problem with mapping load, map id not found

Thanks a lot Pablo...Just tried it with a bit of modifications and its running perfectly...I just post the final code with your suggestion:

MAP1:

LOAD *,

if(WildMatch([FUEL_TYPE], 'DM*') and SULPHUR_CONTENT >.01,'HSDO',

if(WildMatch([FUEL_TYPE], 'DM*') and SULPHUR_CONTENT <.01,'LSDO',

if(WildMatch([FUEL_TYPE], 'RM*') and SULPHUR_CONTENT >.01,'HSFO',

if(WildMatch([FUEL_TYPE], 'RM*') and SULPHUR_CONTENT <.01 ,'ULSFO','NOTYPE'))))  as   NIFuelType

Resident General_Information;

store MAP1 into

[\\ww.hl.lan\HH1\Groups\RHH0T432 - ROB project\14 - QlikView\COMPASS BIAC\RoB - QDF structure 01\QlikViewStorage\SourceDocuments\10.Operations\3.Remaining On Board\2.QVD\\map1.qvd]

(qvd);

drop Table General_Information;

RENAME Table MAP1 to General_Information;

resultmap:

mapping Load

SURVEY_ID,

    NIFuelType

    FROM

[\\ww.hl.lan\HH1\Groups\RHH0T432 - ROB project\14 - QlikView\COMPASS BIAC\RoB - QDF structure 01\QlikViewStorage\SourceDocuments\10.Operations\3.Remaining On Board\2.QVD\\map1.qvd]

(qvd);

DATA:

Load *,

      applymap('resultmap',SURVEY_ID,'No_Fuel_Type') as SoundingCorrection_FUEL_TYPE

     Resident Summary;

drop Table Summary;

RENAME Table DATA to Summary;

Partner
Partner

Re: Problem with mapping load, map id not found

Nice work !!!

I'm glad to help.