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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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

8 REPLIES 8
dpyle
Regular Visitor

I can't do what is being shown as the version of Power BI I have (July 2024) doesn't have the visualization pane. How do I do this without having the visualization tab? I only have the building pane, which as far as I've read is what replaced the visualization pane. I've shared a picture below.

 

dpyle_0-1724196188917.png

 

jstnm
Frequent Visitor

The "accepted solution" was never accepted by me. This issue was never resolved. I tried to mark it as unsolved several time so that when people find this thread they don't think there is a solution but for some reason it cannot be changed.

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
Super User
Super User

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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