4 Replies Latest reply on Dec 13, 2017 11:10 PM by Arshad Nawaz

    Calculating R2 and P values

    Arshad Nawaz

      This is in reference to this thread. Formula for R2 and P values for Trend Lines

       

      Having trouble to mimic the fomulas embedded in the sample workbook in the above mentioned thread by Bora Beran

       

      The main issue with data types on the x and y axis. I could get this working for two continuous variables.

       

      In my situation:

      x -axis is a time period which I am tackling by using the float(date) method (Posted by Andrew Hill)

      y-axis is an already aggregated variables which is not fitting well in the covariance calculation.

       

      {fixed [Category] : SUM(([Weekly Profit] - {fixed [Category] : AVG([Weekly Profit])})*([Weekly Sales] - {fixed [Category] : AVG([Weekly Sales])}))}

      /({fixed [Category] : SUM([Number of Records])} -1)

       

      In this formula Weekly Profit where I have to put my Y-axis variable but it is already aggregated prior and does now fit in this equation.

       

      Any remedy to this will be helpful