Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jshumaker
Frequent Visitor

linestx

I am confused how the LINESTX function works within a group.  The first screen shot is of a matrix showing that there is only 1 k1 record for any given l0 group.  The second screen shot is of a matrix where I am trying to display the LINESTX column of R2 (DAX formula below).  The second matrix only has l0 as part of the row group and therefore should be providing the LINESTX function a unique value for the LINESTX x-value parameter of [k1].  

r2_fk01 =
var l = LINESTX('fk01 mx',[max pct],[k1])
return SELECTCOLUMNS(l,[CoefficientOfDetermination])

 

jshumaker_1-1684073987092.pngjshumaker_2-1684074026030.png

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @jshumaker 

please try

r2_fk01 =
VAR l =
LINESTX ( 'fk01 mx', [max pct], [k1] )
RETURN
AVERAGEX ( l, [CoefficientOfDetermination] )

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @jshumaker 

please try

r2_fk01 =
VAR l =
LINESTX ( 'fk01 mx', [max pct], [k1] )
RETURN
AVERAGEX ( l, [CoefficientOfDetermination] )

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.