0 Replies Latest reply: Aug 3, 2017 4:28 AM by Danielle Howard RSS

    Joining tables together in qlik sense won't work?

    Danielle Howard

      Hi,

       

      I have been creating code in order to load one table and then take a column from one table and do some calculations. I now want to load the table with my calculated field and my original table. The script is shown as below;

       

      [All Electric and Hybrids]:

      LOAD

          VEHICLE_CHASSIS_NUMBER_REMOVE

      FROM [lib://Qlik - Electric/VINS to remove from qlik table.xlsx]

      (ooxml, embedded labels, table is Sheet1);

       

      [Electric and Hybrid Control Vehicles]:

      LOAD

          QUARTER ,

          SYSREF_NO,

          ABI_CATEGORY,

          VEHICLE_TYPE,

          VEHICLE_MANUFACTURER,

          VEHICLE_MODEL,

          VEHICLE_SUB_MODEL,

          MODEL_CODE,

          VEHICLE_BUILD_DATE,

          VEHICLE_BODY_STYLE,

          VEHICLE_ENGINE_TYPE,

          VEHICLE_REG_DATE,

          VEHICLE_CHASSIS_NUMBER,

          VEHICLE_BODY_COLOUR_GROUP,

          PAINT_TYPE_METHOD,

          PAINT_LABOUR_HOURS,

          PANEL_LABOUR_HOURS,

          TOTAL_LABOUR_HOURS,

          PAINT_LABOUR_GROSS,

          PANEL_LABOUR_GROSS,

          PAINT_MATERIAL_GROSS,

          ALL_PARTS_GROSS,

          ADDITIONAL_GROSS,

          TOTAL_REPAIR_GROSS,

          FIRST_IMPACT_AREA,

          SECOND_IMPACT_AREA,

          THIRD_IMPACT_AREA,

          FIRST_CALC_DATE_YEAR,

          CREATOR_SITE_ID,

          WEEK_BEGINNING

      FROM [lib://Qlik - Electric/Lexus GS & IS.xlsx]

      (ooxml, embedded labels, table is [Lexus GS, IS])WHERE NOT EXISTS(VEHICLE_CHASSIS_NUMBER_REMOVE,VEHICLE_CHASSIS_NUMBER);

      STORE * from [Electric and Hybrid Control Vehicles] into [lib://QVD/Electric and Hybrid Control Vehicles.qvd]

       

      [String Correct]:

      LOAD

      VEHICLE_CHASSIS_NUMBER,

      KeepChar(VEHICLE_CHASSIS_NUMBER, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') as string

      Resident [Electric and Hybrid Control Vehicles];

       

      [Length Correct]:

      LOAD

          string,

      if(Len(string)=17, string) As [Correct Length]

      Resident [String Correct];

      STORE * from [Length Correct]into [lib://QVD/lengthcorrect.qvd];

       

      Final:

      Load * from [lib://QVD/Electric and Hybrid Control Vehicles.qvd] (qvd);

       

      Outer Join

      LOAD * from [lib://QVD/lengthcorrect.qvd] (qvd) ;

       

      Any ideas? when I load this it doesn't create the table final!