Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Using Power BI Report Server, the following issues exist for LINESTX...
LINESTX does not report values in row context, so variance to Y-Axis values cannot be calculated...
KnownX values must be placed in the X-Axis field well to display and evaluate the line...
Polynomial regression does not appear to work...
Order3PolyRegression =
VAR Line =
LINESTX (
ALLSELECTED ( Trade[KnownX] ),
[KnownY],
[KnownX],
[knownY],
[KnownX] ^ 2,
[knownY],
[KnownX] ^ 3
)
VAR Slope1 =
SELECTCOLUMNS ( Line, [Slope1] )
VAR Slope2 =
SELECTCOLUMNS ( Line, [Slope2] )
VAR Slope3 =
SELECTCOLUMNS ( Line, [Slope3] )
VAR Intercept =
SELECTCOLUMNS ( Line, [Intercept] )
VAR x =
SELECTEDVALUE ( Trade[KnownX] )
VAR Result = ( x ^ 3 * Slope3 ) + ( x ^ 2 * Slope2 ) + ( x * Slope1 ) + Intercept
RETURN
Result
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.