1 2 Previous Next 17 Replies Latest reply on Nov 14, 2018 11:30 AM by Shinichiro Murakami

    Formula for R2 and P values for Trend Lines

    Jordi Buch

      Hi all,


      So I've been following this excellent community for a long time, but this is actually the first question I post, so please bear with me.

      In a workbook that shows sales revenue over the last 24 months, I want to highlight negative linear trends (so management can take action). However, I only want to highlight (color) them when the negative trend is relevant enough so we don't go into panic mode unnecessarily.

      For this, I found the formula to calculate the slope of the trend-line in this community so I know if it's positive or negative (thanks for that), so that's done. But I'd like to be able to calculate the R2 and P values as well in order to assess the significance of the trend. Understanding you still need to look at the distribution of residuals afterwards, this will at least highlight where there is a certain level of confidence that the trend is really negative and allow me to tell the user to further look into the trend.

      A Tableau consultant I asked recommended using R integrated with Tableau, and while this would certainly make it easier, it's not an option in the organization I am in.


      So any ideas from Tableau Jedi's?



        1 2 Previous Next