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

View all the Fabric Data Days sessions on demand. View schedule

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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