1 Reply Latest reply on Oct 4, 2018 5:40 AM by meenu choudhary

    Monthly product averages

    Alex Martino

      Hello. I have products, and then Jan-September, along the columns. I then have a total average for all months. However, some products have only the most recent months so it shows their average as being super low. How can I change the TOTAL average to divide only the months where there is data for each product?

        • 1. Re: Monthly product averages
          meenu choudhary

          Hello Alex,


          Tableau takes all sales occurrences and creates an average for all of them. So automatic AVG aggregation in Tableau will do SUM (Sales) / COUNT (Sales). If we wish to calculate an average per month,we do need to make an extra calculated field since we want to have AVG aggregation as SUM (Sales) / COUNT (Months).


          You can try below logic:


          Monthly average sales = AVG({FIXED month([Order Date]),year([Order Date]):SUM([Sales])})