5 Replies Latest reply on Sep 2, 2016 1:21 PM by Andrew Watson

    Distribution Calculation Based On Product Category/Year

    Mat Henning

      Hello all!

       

      I've been lurking in the forums and have found an answer to almost every questions I've had with Tableau, but ran across a snag.

       

      Here is what I am trying to achieve.......

       

      • I'd like to calculate the distribution percentage on a specific product on that given year.
        • Multiple years are displayed
      • Example (kind of using Super Store Data):
        • In 2014, 100 Customers purchased a copy machine
          • Of those 100 customers, 80 purchased model #1a, giving that product an 80% distribution rate in the "Copy Machine" product category
        • In 2015, 125 Customers purchased a copy machine
          • Of those 125 customers, 12 purchased model #3b, giving that product a 9.60% distribution rate in the "Copy Machine" product category
        • In 2016, 90 Customers purchased a copy machine
          • Of those 90 customers, 33 purchased model #2C, giving that product a 36.67% distribution rate in the "Copy Machine" product category

       

      I've been racking my brain trying to figure out how to write the "IF [Product Category] CONTAINS [PRODUCT] THEN TOTAL(SUM(COUNTD([CUSTOMERS]))" for just that specific category that the product falls into (I know that formula is WAY off, but I think that is the best way to illustrate what I am trying to get at).

       

      Making maters worse, in a best case scenario I'd like to have multiple product categories shown on one suppliers page - IE if the company selling above also sells paper, I'd like to show the distribution percentage of those items to stores that purchased only "Office Supplies" and not both "Copy Machines" and "Office Supplies."

       

      Thank you in advance for any help that you can provide!

       

      Mat