1 Reply Latest reply: Oct 23, 2017 10:19 PM by Rean Fadyl RSS

    How to create a conditional join?

    Brian Lewis

      I'm trying to create a conditional join, but haven't difficulty setting this up in Qlik Sense.

       

      I need the match between two criterias

       

      Customer ID to Customer ID

      Bill date to >= Account owner by month

       

      example below:

       

      I need to make sure that the $100 billed in January is linked to the sales person 2, as they were the owner in January and that the $200 gets linked to the sales person 1 as they were the owner in Aug 2017.

       

       

      join.PNG

        • Re: How to create a conditional join?
          Rean Fadyl

          I would do this in a multi-step process

           

          1. Left join your two tables based on customer ID into a Temp Table.

          2. Reload your temp table into a new table with a Where clause that confirms that the Bill date to >= Account owner by month

          3. Drop your temp table.

           

          Remember to use NoConcatenate between your table loads to stop all your data disapppearing.

           

          Hope this helps

           

          Rean