0 Replies Latest reply on Sep 26, 2018 1:52 PM by Anky Lai

    moving average (sum) calculation in table different from chart

    Anky Lai

      Hello,

      i usually have January values missing in the database due to the nature of our business - i can calculate the trailing 12 months sales accurately in table form, but it is not correct in the graph. The missing january value is skipped and tableau uses only existing values to calculate the trailing 12 months sales.

       

      Year-MonthSALESTrailing 12 month sum of sales
      15-Feb$266,828,032
      15-Mar$327,818,615
      15-Apr$93,297,539
      15-May$180,004,255
      15-Jun$248,335,624
      15-Jul$128,600,580
      15-Aug$126,014,199
      15-Sep$183,733,268
      15-Oct$121,669,550
      15-Nov$104,097,171
      15-Dec$284,777,099
      16-Jan$2,065,175,932
      16-Feb$251,667,953 $2,050,015,853
      16-Mar$316,280,586 $2,038,477,824
      16-Apr$81,148,692 $2,026,328,977
      16-May$199,540,823 $2,045,865,545
      16-Jun$249,614,761 $2,047,144,682
      16-Jul$146,047,630 $2,064,591,731
      16-Aug$148,733,616 $2,087,311,148
      16-Sep$240,527,689 $2,144,105,570
      16-Oct$93,401,478 $2,115,837,498
      16-Nov$86,288,290 $2,098,028,617

       

      the trailing 12 month chart below is missing the Jan 2016 point and starts with Feb16 which is incorrect - it should be $2.050 vs $2.316. it is using the previous existing 12 values (Feb15 to Feb16) instead of 12 months (Mar15 to Feb16).

      i read something about padded values but i can't get it to work.

       

      thank you in advance.