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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
dogt1225
Helper III
Helper III

Add Trend Lines to Line Chart

I am looking to add two trend lines to the below line chart. One trend line for the blue line and a trend line for the black line. I have created a calendar table due to my company's fiscal calendar, so the X-Axis is categorical and the Trend Line functionality is not available in the Analysis tab. 

Any thoughts on adding trend line for each of these lines?

 

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @dogt1225 
The trend line is a feature that is available only with a continuous X-axis.
The continuous x-axis can be only for numeric / date data type values.
On the attached image it is text....so you should use another format for the period like date or month year numeric like 112024..etc

Ritaf1983_0-1721786664219.pngRitaf1983_1-1721786712682.pngRitaf1983_2-1721786747150.png

There is an idea about the issue you can vote for it here :
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=2722c068-b9b5-ec11-bea1-501ac50a5d5c

As a workaround, you can use linear regression with the Dax method, please refer to the linked blog post of @Daniil 

https://xxlbi.com/blog/simple-linear-regression-in-dax/

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @dogt1225 
The trend line is a feature that is available only with a continuous X-axis.
The continuous x-axis can be only for numeric / date data type values.
On the attached image it is text....so you should use another format for the period like date or month year numeric like 112024..etc

Ritaf1983_0-1721786664219.pngRitaf1983_1-1721786712682.pngRitaf1983_2-1721786747150.png

There is an idea about the issue you can vote for it here :
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=2722c068-b9b5-ec11-bea1-501ac50a5d5c

As a workaround, you can use linear regression with the Dax method, please refer to the linked blog post of @Daniil 

https://xxlbi.com/blog/simple-linear-regression-in-dax/

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.