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

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

Reply
vishnuprashanth
Helper III
Helper III

Adding Trendline to multi variable x-axis

Hi Everyone,

I am trying to add a trendline to the multivariable x-axis in my line chart. If I do it for the date column alone, I am getting the trendline. But if I add my Q_Year(non-date) variable, I am not able to use the trendline. 

Is there any possible way to write a code for the trendline for each half year? 

Below is the Screenshot of my dashboard.

No trendlineNo trendline 

 

Expected output: I am expecting an output like below, but all the charts merged together. 
all these 4 charts combined together with trend line for each quartersall these 4 charts combined together with trend line for each quarters

 



3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @vishnuprashanth,

 

You could refer to this thread providing DAX formula for a trendline.

 

But the desired output that make four separate charts to be merged together in a single chart is not available right now.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft,

Thanks for the response. But I wanted to know if it is possible to have multiple trendlines for each quarter, if I use the DAX formula to create a trendline? 

Example:

 

multi trendline for intervals in x-axis(example done in excel)multi trendline for intervals in x-axis(example done in excel)

@v-yulgu-msftBasically, I wanted a trendline or moving the average line for each interval.

I have asked a question with samples here.
http://community.powerbi.com/t5/Desktop/adding-trendline-for-each-time-interval-of-the-x-axis/m-p/41...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.