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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Maureen
Helper III
Helper III

Keep a constant trend line when filtering

In this attached scatterplot, I have schools for the entire state with a trend line.  I would like to filter to certain schools to see where they are in relation to that trend line but when I do, the trend line fits to only the filtered data points.  Is there a way to keep the trend line constant and then HIGHLIGHT certain schools selected from the slicer?

 

Maureen_0-1675801011534.png

 

4 REPLIES 4
Vanchy_Liao
Resolver I
Resolver I

This is a good idea that adding a custom trend line with measure.

In my context, it is really useful, especially displaying forecast points.

 

reiff
New Member

The analytics lines, such as trend, are baked into PowerBI and as such you cannot build measures in there.

 

The formula that Jirka suggested would replace the value that you used in the visual, and is a measure that you build such as SUM ( SALES[sales] ). The idea is that ALL would remove the filters present in the visual and so the trend line would move with the schools that you choose. If you replicate the measure with your own values and introduce that into the visual then you should get what you need.

JirkaZ
Solution Specialist
Solution Specialist

Sure - you'll just have to ignore the filter using ALL in the calculation of the trend line. 

The sytax will be something like:

 

Trend Line Value All := CALCULATE([Trend Line Measure], ALL('Schools'))

 

Obviously you may need to tweak the formula so that it matches your expectations.

Thank.  I am not seeing an option to add a formula under the analytics tab for the scatterplot option . . .where could I add this formula to impose  the line on the scatterplot . . . .

 

Maureen_0-1675802980427.png

 

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors