6 Replies Latest reply on Mar 20, 2018 1:36 PM by Jim Dehner

    Adding New Rows with Zeros for Correct Averaging?


      Hi all! Hoping for a bit of help here:


      Suppose I have a data file that has customers' spending by product category, but with no row for a given product category if no purchase was made in that category (rather than a row for the category with a spend of $0.00). When I calculate the average of each category, by default Tableau uses the count of values rather than the count of customers as the denominator. Therefore it is not return a true average spend per customer, but rather than an average spend per purchase. Is there a way to add rows and impute 0's to correct for this?


      Sample data file with current and desired structure is attached.


      And help would be greatly appreciated!