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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AC_DATA
Frequent Visitor

Scatter Plot Average Line

I am trying to get an accurate average line on a scatter plot with average values plotted for items by their count.

PBI takes an average of the averages which yields an inaccurate number. How can I get the average line to show the overall average of all the items in the plot, not the average of the averages of the items by category in the plot (see the picture below)?

 

Scatter Plot Example.png

 

Here is the sample data (there is a report-level filter on TYPE = "Fruit"):

UIDTYPECATEGORYITEM_VALUE
1FruitApple2.2
2FruitApple1.3
3FruitApple2.9
4FruitBanana2.0
5FruitBanana1.1
6FruitCherry4.3
7FruitCherry1.7
8FruitCherry5.5
9FruitCherry2.0
10FruitDragonfruit3.5
11FruitDragonfruit1.2
12FruitDragonfruit2.0
13FruitElderberry1.7
14FruitElderberry3.1
15VegetablePotato2.5
16VegetablePotato1.4
17VegetablePotato2.6
18VegetablePotato1.1
19VegetableBroccoli2.6
20VegetableBroccoli3.7
21VegetableBroccoli2.7
22VegetableSquash5.1
23VegetableSquash5.4
24VegetableSquash4.7
25VegetableCorn4.4
26VegetableCorn3.9
27VegetableCorn4.9
28VegetableCorn1.8
29VegetableCorn1.9
30VegetableLettuce1.8
31VegetableLettuce2.5

 

Here is the DAX for the calculated column:

 
Average Item Value By Category (Column) = CALCULATE(
    AVERAGE(DATA_SET[ITEM_VALUE]),
    ALLEXCEPT(DATA_SET, DATA_SET[TYPE])
)
 
1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

Looking at your chart, it seems odd that your X-axis is a count of UIDs.   It seems that how many UID's a certain product category has isn't a useful way to group or plot them.  However, it seems your problem resides in how simple and uncustomizable the Data Analytics lines are for scatterplots.

 

I've done some reasearch, and playing around with your example file, and as far as I can tell, there's no way accomplish this with a scatterplot, unless you make a custom visual. I even played around with some of the scatterplots on the marketplace, and none of them seemed to be able to accomplish this either.

 

My solution would be to use a different visual.  I'd set this up as a bar and line chart.  Then you can set up a measure or your average column as the line value, and set the category types as the X-Axis.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

 

up

 

still no solution around?

 

i face the same problem not having the option to have a weight calculation when average on group of record

 

this will be major PITA for my project with Powerbi if no workaround.

i need to do a lot bubble chart at group level with a weighted average (which allow to show which group perform better than the average)

 

Cmcmahan
Resident Rockstar
Resident Rockstar

Looking at your chart, it seems odd that your X-axis is a count of UIDs.   It seems that how many UID's a certain product category has isn't a useful way to group or plot them.  However, it seems your problem resides in how simple and uncustomizable the Data Analytics lines are for scatterplots.

 

I've done some reasearch, and playing around with your example file, and as far as I can tell, there's no way accomplish this with a scatterplot, unless you make a custom visual. I even played around with some of the scatterplots on the marketplace, and none of them seemed to be able to accomplish this either.

 

My solution would be to use a different visual.  I'd set this up as a bar and line chart.  Then you can set up a measure or your average column as the line value, and set the category types as the X-Axis.

 

Thank you, @Cmcmahan. That is what I was afraid of.

I will try a different visualization type before venturing into the realms of creating custom visualizations.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors