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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jstnm
Frequent Visitor

Add a trend line to a line chart Power BI 2024

Hello,

 

I have a line chart and I need to add a trend line to it, all the posts I can find on here are on an old version of Power BI (thats why I put the year in the subject).  Those old ones all have a trand line option in the analytics part of their program, but that is no longer the case:

jstnm_0-1710878164174.png

Does anybody know how to add a trend line in a current version of Power BI? Version 2.123.742.0

 

1 ACCEPTED SOLUTION
gmsamborn
Super User
Super User

Hi @jstnm  @YG0n 

 

In addition to the comments by @v-xuxinyi-msft , a continuous axis has a couple of rules.

 

A continuous axis must be a number preferably with no gaps.

 

Usable Numeric examples include:
Date (dates are stored as numbers)
Year
Week of Year, Month of Year, Quarter of Year, etc ONLY for a single year otherwise totalling by [Week of Year] for example would include that week for all selected years

 

NOT Usable Non-numeric examples include:
Month name
Quarter
any column like [Yr-Mon], [Yr-Qtr], [Yr-Week]
also columns [Yr-Mon Number], [Yr-Qtr Number], [Yr-Week Number] because of gaps.

 

While trend lines can be used with Years (over a long period of time),  they are usually used with Dates as well as a few other numeric examples when showing a single year.

 

 

 

View solution in original post

6 REPLIES 6
gmsamborn
Super User
Super User

Hi @jstnm  @YG0n 

 

In addition to the comments by @v-xuxinyi-msft , a continuous axis has a couple of rules.

 

A continuous axis must be a number preferably with no gaps.

 

Usable Numeric examples include:
Date (dates are stored as numbers)
Year
Week of Year, Month of Year, Quarter of Year, etc ONLY for a single year otherwise totalling by [Week of Year] for example would include that week for all selected years

 

NOT Usable Non-numeric examples include:
Month name
Quarter
any column like [Yr-Mon], [Yr-Qtr], [Yr-Week]
also columns [Yr-Mon Number], [Yr-Qtr Number], [Yr-Week Number] because of gaps.

 

While trend lines can be used with Years (over a long period of time),  they are usually used with Dates as well as a few other numeric examples when showing a single year.

 

 

 

My X-axis is set to continuous:

jstnm_0-1711994334476.png

It is using a Date column:

jstnm_1-1711994356781.png

 

The data type for the date column is Date:

jstnm_2-1711994423584.png

I still have no option for a trend line under further analysis:

jstnm_3-1711994472906.png

 

YG0n
New Member

I have the exact same issue

v-xuxinyi-msft
Community Support
Community Support

Hi @jstnm 

 

Thanks @samratpbi  for your timely reply. Here is my testing:

 

My version:

vxuxinyimsft_4-1711430654884.png

 

First the X-axis Type needs to be "Continuous", not "Categorical".

vxuxinyimsft_1-1711430306304.png

 

Then you can open the "Trend line" under "Further analyses".

vxuxinyimsft_2-1711430466404.png

 

If the type of the x-axis is ”Categorical“, there's no such option.

vxuxinyimsft_3-1711430573213.png

 

Best Regards,
Yulia Xu

 

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

samratpbi
Resolver IV
Resolver IV

Hi, I am in Feb 24 version and I can see this in a line chart. Are you looking for the same?

samratpbi_0-1710878579862.png

If this resolves your problem, then please mark it as Solution, Thanks!

What version number are you on? This is what mine looks like for Line Chart:

jstnm_0-1711374201516.png

I do not have the option for trend lines anywhere in these blades.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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