Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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.