4 Replies Latest reply: Aug 23, 2016 4:37 PM by Haikuo Yu RSS

    Overwriting already loaded data (Qlik Sense)

    Demian Rebollo

      Hello Community,

       

      I am stuck here and need help.

       

      I am loading data from Excel and once loaded I need to change some cells of a table depending on a condition.

      The sample data is as follows:
      CurrentData.jpg

      In the Load script there is no issue loading both columns, Business Unit and Business Segment.

      However, I need to reassign all the Business Segment cells containing the word "Project" to the Sales Projects Business Unit. This is the desired result:

      DesiredResult.jpg

      As you may notice, at Load time there are Business Segment cells that belong to Sales Projects, that must remain like that.

       

      I tried do a Mapping, like this:


      Move_to_BU_from_BS:

      MAPPING LOAD * INLINE

      [

        'Business Segment', 'Business Unit'

        Project Product, Sales Projects,

        Project Parts, Sales Projects,

        Project Special, Sales Projects,

        Project International, Sales Projects

      ];

       

      but once loaded, Business Unit cannot be used again in the mapping of Business Segment. I get this error message: Field names must be unique within table.

      This is caused because Business Unit has already been loaded and I am attempting to use the name again in the mapping...

       

      Maybe mapping is not the right solution, so I will appreciate any hints and help to find the correct way of doing it.

       

      I am attaching also the Excel file with both CurrentData and DesiredResult tables.

       

      Thank you!