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