1 Reply Latest reply: Dec 18, 2011 9:50 AM by Erica Whalley RSS

    combination of 2 tables with partly same fields

      Ok boys, I have an (beginner level) issue.


      I have 2 different tables, which in fact should become 1 table (so with join or concatenate I guess). But I get error messages all over the place when I try to do it.


      So I have 6 common fields (please look at attachment) :





      Business Segment


      Source Cat




      furthermore i have a few individual fields like Flag etc


      so for the productgroups, i use for the one table a crosstable and the other one is a straight one, that's no problem.


      But now I want to get them into one table: common fields nice in eachother and the empty fields zero


      But it doesnt work


      Most probably I do lots of stuff wrong, can somebody help me please?


      1000x thanks

        • combination of 2 tables with partly same fields

          Hi Giobenoni.


          When you perform a cross table, the parameters in it specify:


          1: "attribute field" : the name of the field that contains the "old" field names, ie in your case I guess the name of the field that will contain {"prodgroup1", "prodgroup2"...} as values.

          2: the data field, which contains the old values that were in this field.

          3: the number of preceeding columns to ignore.


          The issue with your code is that you have asked qlikview to call the attribute field "Year", whicis will cause problems because it is already a field that is there. Since you would like to match this field to the [Product Group] in the second table, specify it the same name in the crosstable, So it should look like:


          crosstable([Product Group],Data,9)



          Qlikview will only concatenate if the two tables have the two sets of fields the same. To "force" concatenate, use the concatenate prefix in the load script:





          Data in a field will be set to null for table data that does not have this field in common.


          Is this what  you are after?