Forum Discussion
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?
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..etcThere is an idea about the issue you can vote for it here :
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=2722c068-b9b5-ec11-bea1-501ac50a5d5cAs 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
1 Reply
- Ritaf1983Super 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..etcThere is an idea about the issue you can vote for it here :
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=2722c068-b9b5-ec11-bea1-501ac50a5d5cAs 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