2 Replies Latest reply on Jun 30, 2016 4:33 AM by Lotte Kammenga

    Sum up total of all within a group

    Lotte Kammenga

      Hi all,
      I'm making a report where I'm comparing the performance of one product in relation to all products within the product group.

      I'm specifically looking at how many products are returned and after what time.

      My Tableau table looks like this

      So you can see that at the point of sale nobody has returned, and the percentage of live sales gets lower as time goes on.

      Within the product groups are multiple products, the products have product codes. The table for the product codes looks the same in Tableau as the one above, except it has a product code on the row label.

      What I'm interested in is comparing the performance of one product with the overall performance within the group.

      I can't provide an example workbook because it contains customer data, but the data looks like this. The number of months the sale has been live is a calculated field.


      ProductCodeProduct GroupSale DateCancel Date
      123456Group 1Jun 2012Oct 2015
      123457Group 1Aug 2015
      123458Group 1Jan 2011Mar-11
      123459Group 1Jun 2014Feb-15
      123460Group 1Sep 2010
      123461Group 1Sep 2006
      123462Group 2Jun 2012
      123463Group 2May 2015Dec-15
      123464Group 2Dec 2011
      123465Group 2Jun 2015
      123466Group 2Sep 2010
      123467Group 3Sep 2006
      123468Group 3Jun 2012May-15
      123469Group 3Aug 2015Aug-15
      123470Group 3Jan 2011
      123471Group 4Jun 2014
      123472Group 4Sep 2010Apr-14
      123473Group 4Feb 2007
      123474Group 4Apr 2011
      123475Group 4Jun 2013


      Ultimately what I want is a graph with one line for the product code, and a line for the product group within the same graph. However, I can't do a dual axis because then the filter on product code would apply to both selections, and it won't give me a total of all products within the product code.

      I think the only way to do it is to get both values (total for the product and total for the group) in the same table first. So what I'm trying to do is select a product code, and then I want Tableau to look at what group the product belongs to, and give me a grand total of everything in the group. But I don't know how to do that. Can any of you help me?