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

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

Reply
jshumaker
Frequent Visitor

linest grouping

is it possible to return multiple rows back from a linestx function?  Running one regression model at a time is not good enough as I need to have a line chart with a legend showing multiple lines at the same time

2 ACCEPTED SOLUTIONS
OwenAuger
Super User
Super User

The LINESTX function itself always returns a single row, containing the result of a single least squares regression.

 

However, if you placed a particular column as the legend of a line chart, a measure that used LINESTX would carry out the regression for each value of that column.

 

Could you give some more detail on how you would want your visual to work along with sample data?


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

@jshumaker 

Apologies - I was sidetracked and didn't respond to your reply!

You have likely resolved this since your last post!

 

I had a play around in any case. (My regression measure is probably not identical to yours)

 

The built-in line chart can't display two measures if a legend is included, but I created a line chart showing the y Estimate (bottom chart).

 

You could also use the built-in trend line regression, which should give the same result (top chart).

 

Hopefully this is useful if you are still looking at this.

OwenAuger_0-1684581588810.png

 

Regards,


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

3 REPLIES 3
jshumaker
Frequent Visitor

here is my matrix of the data that I want to run a regression model on and a line chart of the actual values

jshumaker_0-1683376395836.png

jshumaker_1-1683376566066.png

 

 

@jshumaker 

Apologies - I was sidetracked and didn't respond to your reply!

You have likely resolved this since your last post!

 

I had a play around in any case. (My regression measure is probably not identical to yours)

 

The built-in line chart can't display two measures if a legend is included, but I created a line chart showing the y Estimate (bottom chart).

 

You could also use the built-in trend line regression, which should give the same result (top chart).

 

Hopefully this is useful if you are still looking at this.

OwenAuger_0-1684581588810.png

 

Regards,


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn
OwenAuger
Super User
Super User

The LINESTX function itself always returns a single row, containing the result of a single least squares regression.

 

However, if you placed a particular column as the legend of a line chart, a measure that used LINESTX would carry out the regression for each value of that column.

 

Could you give some more detail on how you would want your visual to work along with sample data?


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

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.