3 Replies Latest reply on Sep 10, 2018 12:29 PM by Mark Burkardt

    Create a master key column from 3 fields for joining tables

    Kenneth Lam

      Hi all,

       

      I have got three tables, each with one column, that contain brand list, country list and time (week). To join with my other data tables, I would like to create a cross-product of the three fields which serve as a unique key.

      I have tried using pivot and joins but no luck so far. I have attached the workbook and a screencap below. Please help/ advise.

      The merged list should look something like:

         

      RowCountryWeek Start DateBrand
      1Albania1/2/2017A
      2Albania1/2/2017B
      3Albania1/2/2017C
      4Albania1/9/2017A
      5Albania1/9/2017B
      6Albania1/9/2017C
      7Albania1/16/2017A
      8Albania1/16/2017B
      9Albania1/16/2017C
      10Australia1/2/2017A
      11Australia1/2/2017B
      12Australia1/2/2017C
      13Australia1/9/2017A
      14Australia1/9/2017B
      15Australia1/9/2017C
      16Australia1/16/2017A
      17Australia1/16/2017B
      18Australia1/16/2017C
      19China1/2/2017A
      20China1/2/2017B
      21China1/2/2017C
      22China1/9/2017A
      23China1/9/2017B
      24China1/9/2017C
      25China1/16/2017A
      26China1/16/2017B
      27China1/16/2017C