Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a calculation that works great to produce a bar chart. I need to use the same calculation to calculate a KPI for the R2 value. The attached App has the bar chart, a scatter chart and a KPI. The bar chart has numerator/denominator. Scatter has numerator = X and denominator = Y. KPI is trying to replicate those and just give me the R2 value.
Numerator =
Avg({1<Year = {$(=Max(num#(Year ,'####')))}>} Aggr(
Sum({1<QPermID={"TF0050_T_6*","TF0100_T_5*","TF0200_T_9*","TF0300_T_5*",
"DF0050_T_6*","DF0200_T_100*","DF0100_T_5*","DF0300_T_100*"}>}Response)
,YearID,Year))
Denominator =
Avg({1<Year = {$(=Max(num#(Year ,'####')))}>} Aggr(
$(vTDAssets)
,YearID,Year))
R2 calculation should be:
=LinEst_R2(
avg({1<Year = {$(=Max(num#(Year ,'####')))}>} total Aggr(
sum({1<QPermID={"TF0050_T_6*","TF0100_T_5*","TF0200_T_9*","TF0300_T_5*",
"DF0050_T_6*","DF0200_T_100*","DF0100_T_5*","DF0300_T_100*"}>}Response)
,YearID,Year))
,
avg({1<Year = {$(=Max(num#(Year ,'####')))}>} total Aggr(
$(vTDAssets)
,YearID,Year))
)
but it doesn't give a result.
Thanks