Forum Discussion

DHB's avatar
DHB
Helper V
9 years ago
Solved

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 Ac...
  • v-sihou-msft's avatar
    9 years ago

    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:

     

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

    Regards,

  • DHB's avatar
    DHB
    9 years ago

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