2 Replies Latest reply on Oct 17, 2013 11:48 AM by Matt Lutton

    SUM in a table after a match in a separate table

    Moe G

      Hi,

       

      I'm relatively new to Tableau and I could use help with a JOIN. I have simplified my use case with this canned data.

       

      Table 1 (Sales) has customer orders with a PO number and an industry classification.

       

      CustomerIndustryPO Number
      Customer 1Apparel1
      Customer 1Apparel2
      Customer 2Food3
      Customer 2Food4
      Customer 3Apparel5

       

      Table 2 (Revenue) has revenue recognized after shipments. A single PO can result in multiple shipments.

       

      CustomerShipment
      Customer 1100
      Customer 2200
      Customer 1300
      Customer 3100
      Customer 150
      Customer 250
      Customer 250

       

      I'm trying to generate sum of shipments for each industry. I expect Apparel industry (Customer 1 & 3) to report 550 & Food industry (Customer 2) to report 300.

       

      It seems like I need to SUM the AVERAGE of distinct customer shipments in the joined table but I'm not sure how to accomplish this.

       

      Thanks,

      Moe