2 Replies Latest reply on Sep 11, 2019 1:04 PM by Bryce Larsen

    Weighted Average

    Helen Steneker

      Hello,

      I'm attempting to created a calculated field that displays a weighted average (see the attached photo).

      The "Purchase Tier" is a product's priority. If the tier is 1, it's a popular item. This is a provided field. What I'm trying to do is calculated a tiering of each customer using a weighted average. If the customer buys a lot of tier 1 items with a high purchase amount, the client will be valued highly, and vice versa.

      The column on the right is what I wish to calculate in Tableau. I did this as follows

      Purchase tier = x, purchase amount = a

       

      sum(x1*a1+x2*a2+x3*a3+...+xn*an) / (a1+...+an)