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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
soogiang
Regular Visitor

Adding Trend line with DAX?

Hi,

 

I am trying to add a Trend Line to a Line and clustered column chart as below.

Is it possible to create a trend line using DAX  like the one in Excel?

"avg of ph average Roll" data need to be used for the trend line.

 

Any thoughts / help greatly appreciated!

 

 

 

Cap11ture.JPG

 

Here is my sample data

 

Data_pbix 

4 REPLIES 4
amitchandak
Super User
Super User

@soogiang , You can use the analytics pane Constant line of Avg Line

 

I have an example for scatter here

Power BI Customer to Retain, Scatter Quadrant -Segment in 4 quadrants based on Margin % and Discount, Use Constant Line- https://youtu.be/0k_C_E7YOQY

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I am seeing Error bars option only. I dont think the analytics pane is available in my line and cluster column chart. any idea?

@soogiang , You can try measures like

 

Measure = CALCULATE(AVERAGE('Table'[Average of Time]), ALLSELECTED())

 

or

 

Measure = CALCULATE(AVERAGE('Table'[Ph Average Roll]), ALLSELECTED())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

your measure added a constant line, but it is not a correct trend line.Cap11ture.JPG

 

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.

Top Solution Authors