3 Replies Latest reply: Jul 15, 2013 9:34 AM by Jason Newman RSS

    Simple applymap() not working

      I want to use applymap but I cannot get it to work. I have tried executing a simple example so i could then apply that to what I need but I can't get the simple example to work! :

       

      Table importing from Excel:

      %KeyColour
      11
      22
      31

       

      Code in script:

      Table1:

      LOAD *,

           ApplyMap('ColourDesc',Colour, 'Unknown')as AColour;

      LOAD %Key,

           Colour

      FROM

      C:\Users\Documents\Qlikview\Demo.xls

      (biff, embedded labels, table is Sheet1$);

       

        

      ColourDesc:

      MAPPING

      LOAD

                Colour,

                CDescription

      INLINE [

      Colour, CDescription

      1,Red

      2,Blue

      ];

       

      To me it looks the same as all the examples I have looked at but it doesn't want to work as the description is not assigned to AColour

       

      Any help?

       

      Regards

      Jason