2 Replies Latest reply: Nov 2, 2017 5:28 PM by omar bensalem RSS

    Creating Multiple Account Flags

    Afroz Hyder

      Table:

      Load * inline

      [

      ID, Type

      1, A

      1, B

      2, A

      2, B

      2, E

      3, D

      3, B

      3, C

       

       

      ];

       

       

      FlagTable:

      LOAD ID,

      1 as Flag1,

          IF(MATCH(UPPER(Type), 'A'), 1) as Flag2,

          IF(MATCH(UPPER(Type), 'B', 'C'),  1) as Flag3

      RESIDENT Table;

       

       

      DROP TABLE Table;

      EXIT SCRIPT;

       

      Getting:

      Qlik.PNG

      WANT:

       

       

      IDFlag1Flag2Flag3
      1111
      2111
      311

       

       

      Any suggestions?