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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.