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
DHB
Helper V
Helper V

histogram problem

I'm trying to create a histogram using this data.  I'm using Activity Score as the Value and want to show the average of Average Test Score in each bucket.  What I'm getting though is Frequency of Activity Score in each bucket.  So for the first bucket (Activity Scores 4.8-13.86) I get a frequency of 4 (4.8 twice, 9.7, 12.6 and 13.5).  I would like an average of .8333, .8, .7666, .775 and .6222.   Any ideas what I'm doing wrong?  Thank you in advance.

 

ACTIVITY_SCOREAverage of Test Score
4.80.833333333
4.80.8
9.70.766666667
12.60.775
13.50.622222222
15.50.95
15.50.766666667
16.40.633333333
17.40.822222222
17.40.766666667
19.30.922222222
19.30.625
19.30.444444444
21.30.777777778
22.20.905555556
22.20.455555556
23.20.8
23.20.733333333
23.20.688888889
23.20.45
23.20.811111111
24.20.9
24.20.641666667
25.10.858333333
25.10.798333333
25.10.858333333
25.10.855555556
25.10.788888889
2 ACCEPTED SOLUTIONS
v-sihou-msft
Microsoft Employee
Microsoft Employee

@DHB

 

Accordin to your description, you want to create average for each bucket of your table. Right?

 

In this scenario, you should create a bucket table like:

 

55.PNG

Then create a Bucket Column in your source table.

Bucket = CALCULATE(VALUES(Table1[BucketGroup]),FILTER(Table1,Table2[Score]>Table1[MinScore] && Table2[Score]<=Table1[MaxScore]))

Then you can just include this column and Activity Score column into same table. Change the aggregation type into "Average".

555.PNG

Regards,

View solution in original post

That looks perfect.  I'll give it a try.  Thank you.

View solution in original post

3 REPLIES 3
v-sihou-msft
Microsoft Employee
Microsoft Employee

@DHB

 

Accordin to your description, you want to create average for each bucket of your table. Right?

 

In this scenario, you should create a bucket table like:

 

55.PNG

Then create a Bucket Column in your source table.

Bucket = CALCULATE(VALUES(Table1[BucketGroup]),FILTER(Table1,Table2[Score]>Table1[MinScore] && Table2[Score]<=Table1[MaxScore]))

Then you can just include this column and Activity Score column into same table. Change the aggregation type into "Average".

555.PNG

Regards,

That looks perfect.  I'll give it a try.  Thank you.

I've used the information that you gave and been able to do exactly what I was trying to do.  Thank you so much.

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 Fabric 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.