3 Replies Latest reply: Dec 3, 2013 12:20 PM by Gerrit Zanen RSS

    Question about Mapping and Dual

      The Script below works well. But I have a question, why do I get 0 and 1 as the outcome in the table and not the text Purchase and Sales when I use the original fieldname [Entry Type]? If I create a new field [Entry Type Dual] I do get the expected result with the text!



           EntryTypeNum, EntryTypeDesc

           0, Purchase

           1, Sales





           dual(ApplyMap('EntryTypeMap', [Entry Type]), [Entry Type]) as  [Entry Type Dual],

           dual(ApplyMap('EntryTypeMap', [Entry Type]), [Entry Type]) as  [Entry Type]

      Residend abc;


      Any idea?





        • Re: Question about Mapping and Dual
          Matthias Vandendriessche

          Hi Gerrit,


          QlikView will always decide the number formatting of a field the first time this field is loaded. So because of the facts that:


          1) QlikView has identified this fieldname with the NUM-format when it first loaded this field.

          2) you are reusing this fieldname.


          ; QlikView will use the NUM-format as the default format for your dual-value. This also explains that when you give the field another name, it does use the TEXT-format as default (as it usually does with dual-values).