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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

 

3 REPLIES 3
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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