4 Replies Latest reply: Jun 9, 2016 2:53 PM by QlikNewbie k RSS

    Crosstable creates additional fields

    QlikNewbie k

      Hi All,

       

      I have the following main table, each record has a category (I have a total of 4 categories). Then I have another table with categories as columns and then one number for each category. I need to link this to my main table so that Qlik has col1 number for category 1, col2 number for category2, etc.

      Main Table:

        

      IDCategory
      1category1
      2category2
      3category1
      4category3
      5category4
      6category4

       

      MySecondTable:

        

      col1col2col3col4
      450740980239

       

       

      I know I should use cross table but not sure why my script generates the categories again.

       

      CrossTable(Category,[Category Number])

      LOAD

      col1 as category1,

      col2 as category2,

      col3 as category3,

      col4 as category4

      FROM MySecondTable;