Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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.