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
SRioux
Frequent Visitor

Adding Dynamic Average to scatter plot

Hi 

 

I've been looking to add a dynamic average line to a scatter plot and can't seem to find a solution to something that seems quite basic. 

 

Here's what I want to do:

 

Assume I have the following table:

table.PNG

 

I created a scatter plot of my data and created a measure for the Average Revenue, which is displayed below.

 

scatter.PNG

I want to add a horizontal line which shows the Average Revenue to my scatter chart. 

 

This is a simple example, but in real life my scatter chart has a bunch of filters and the average is recalculated automatically based on the selected filters. The Average Line needs to adjust when I change filtering options.

 

Is there an easy (or any) way to do this?

 

Thanks! 

 

4 REPLIES 4
Greg_Deckler
Super User
Super User

Use the Analytics tab (magnifying glass), there is a built-in option for an Average Line. Click visual, underneath VISUALIZATIONS click the magnifying glass.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi Greg

 

Yes, I have been looking for that option, but it's not there. The only options available are the trendlines and constant X and Y values. Average doesn't show up. My guess is it's because there are no Y values to average for any given X value (as each X value has a different Y value).

 

 

@SRioux,

 

In the Visualizations pane, right-click [Revenue] dragged to Y Axis, and change the aggregation to Sum.

https://docs.microsoft.com/en-us/power-bi/service-aggregates

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

Thanks, but that does not display a dynamic Average of the selected filered values. I want the average line to change when I change selected filters. This average is static.

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.