Is there a simple way to caclulate the R^2 value in a Power Pivot? In 'normal' excel, we can use the RSQ function but that function doesn't exist among the Measure functions in Power Pivot.
Asked
Active
Viewed 894 times
2 Answers
2
Short answer: No. There's no native DAX equivalent of the Excel RSQ function.
You could create DAX calculations to determine the Pearson correlation (example) or you could use R script (example)

Olly
- 7,749
- 1
- 19
- 38
-
Thanks, I'll try the PowerBI method because I'm trying to accomplish this without using R. – GreenManXY Sep 05 '19 at 10:30
2
As @Olly says, there isn't a built-in equivalent but the formula is not too difficult to write yourself.
Correl =
VAR AvgX = AVERAGE ( Table1[x] )
VAR AvgY = AVERAGE ( Table1[y] )
RETURN
DIVIDE (
SUMX ( Table1, ( Table1[x] - AvgX ) * ( Table1[y] - AvgY ) ),
SQRT (
SUMX ( Table1, ( Table1[x] - AvgX ) ^ 2 ) *
SUMX ( Table1, ( Table1[y] - AvgY ) ^ 2 )
)
)

Alexis Olson
- 38,724
- 7
- 42
- 64