7 Replies Latest reply on Mar 9, 2018 12:27 PM by Norbert Maijoor

    How to calculate Variance with prior 3 month average

    Naveen AM

      Hi all,

      I'm trying to calculate variance of cost from the 3 months prior to the selected month.

      For example, if December 2016 is selected,

      Variance with prior 3 months = [December Cost – (November Cost + October Cost + September Cost)/3] / December Cost


      I'm using Tableau 10.1.4 and the workbook with sample data is attached. I'm used "L3M Cost" calculated field to calulate last 3 month sum, but it includes the selected month as well and doesn't start with the month prior to the selected month. Any help with this will be hugely appreciated.