7 Replies Latest reply: Dec 28, 2012 10:46 AM by Stefan Wühl RSS

    mapping not working

      I have the following tabs in script:

       

      tab1:

       

      [Location list]:

       

       

      LOAD [Department survey],

          
      Locations

      FROM

      [..\Data\EXCELs\Bilal-Mafraq locations.xlsx]

      (
      ooxml, embedded labels, table is Locations);

       

       

       

       

      Tab 2:

       

       

       

      [Surveys]:

       

       

      LOAD 1 as Count,

          
      Locations,

            [Q10.1. Please rate your overall experience with us:]as [Overall Experience],

      FROM

      [..\Data\EXCELs\Bilal-Mafraq inpatient (Feb mach).xlsx]

      (
      ooxml, embedded labels, table is Sheet1);

       

       

       

      Tab 3:

       

       

      [Satisfaction Score]:

       

       

      mapping LOAD * INLINE [

          Overall Satisfaction, Weight

          Satisfied, 100

          Extremely Satisfied, 100

          Neutral, 100

          Extremely Dissatisfied, 100

          Dissatisfied, 100

      ]
      ;

       

       

       

      Tab 4:

       

       

      [Surveys]:

      Load

      *,

      ApplyMap('Satisfaction Score',[Overall Experience]) * Count as [Satisfaction Score];

       

       

       

       

       

       

       

      When i Execute the code the table appear but the new mapping column (Satisfaction Score) doesnt appear.

      Anybody have an idea what might be wrong? is it the order of the tabs or the apply mapping thing!!!!!!!

       

      PLEASE HELP AS SOON AS POSSIBLE

        • Re: mapping not working
          Stefan Wühl

          This is not a meaningful load statetement, you are missing the source:

           

          [Surveys]:

          Load

          *,

          ApplyMap('Satisfaction Score',[Overall Experience]) * Count as [Satisfaction Score];

           

          It will not produce a script error, though.

           

          I assume you want to re-use the data from your surveys table, so try:

           

          [SurveysResult]:

          Load
          *,
          ApplyMap('Satisfaction Score',[Overall Experience]) * Count as [Satisfaction Score]

          Resident Surveys;

           

          drop table Surveys;

           

           

          (there is also a comma in your tab 2 load (after [Overall Experience]) that needs to be removed)

           

          Hope this helps,

          Stefan