1 Reply Latest reply on Jul 2, 2018 11:52 AM by Jim Dehner

    Trailing Total Return Calculation

    Matt Wilson

      I need to improve my calculation for the total trailing 1 year return for an index fund.

       

      ((max([AdjClose]))/LOOKUP(max([AdjClose]),-253))-1

       

      253 is supposed to represent the number of trading days in a year. However, it doesn't always work.

       

      The data looks like this.

       

       

      The main problem is that I need dividends to be factored into the calculation. The math should be as follows. I just can't figure out how to make tableau do this.

       

      (Adjusted Close as of Timestamp + Dividends received in the last year/Adjusted close 1 year ago)-1

       

      Please help. Thanks!