1 Reply Latest reply: Mar 13, 2018 5:00 AM by Marcus Sommer RSS

    map using dual

    George Menoutis

      If I use this in Qliksense:

       

      YesNoMap:
      MAPPING LOAD num, dual(str, num) INLINE [
      num, str
      0, No
      1, Yes
      ];

      MAP Shipped USING YesNoMap;


      Then Shipped (after a load) does NOT work as dual, as intended. Is the functionality not yet implemented?

        • Re: map using dual
          Marcus Sommer

          It should work. Maybe there is a mistake with the fieldnames or your order of the actions is wrong. If I do the following in QlikView it worked (switching to autogenerate just to avoid potential problems with the number-interpretation of inline loads):

           

          YesNoMapTemp:

          load 0 as num, 'no' as str autogenerate 1;

          load 1 as num, 'yes' as str autogenerate 1;

           

          YesNoMap:

          mapping load num, dual(str, num) resident YesNoMapTemp;

           

          drop tables YesNoMapTemp;

           

          MAP F1 USING YesNoMap;

           

          t:

          load 0 as F1, 'a' as F2 autogenerate 1;

          load 1 as F1, 'b' as F2 autogenerate 1;

           

           

          - Marcus