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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
HunterAlpert
Helper I
Helper I

Grouping data together

I have a dataset which includes the person, and their average score. I need to break those scores out into buckets of >90, >80, etc. with the count of people who averaged that score. However, I am having a hard time grouping them in this fashion: I am able to set up the people, and see their average scores, but grouping them is where I get lost. Please help!!

 

What I need to show is two more columns showing a score range and then the count of people who's average score falls into that range. so it should look like this: 

PersonAverage Score

Score Range

Number in column

A90

90-100%

1

B80

80-89%

1

C

70

70-79%

1

D60

60-69%

1

e58

<69%

3

f58

 

 

g58

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @HunterAlpert ,

 

Based on your description, you can do some steps as follows.

  1. Create a calculated column to mark the range.

 

Score Range = SWITCH(

    TRUE(),

    [Average Scores]>=90&&[Average Scores]<100,"90-100%",

    [Average Scores]>=80&&[Average Scores]<90,"80-89%",

    [Average Scores]>=70&&[Average Scores]<800,"70-79%",

    [Average Scores]>=60&&[Average Scores]<70,"60-69%",

    "<69%")

v-yuaj-msft_0-1607648062271.png

    2. Create a measure to count filtered rows.

 

Number in column = COUNTROWS(FILTER(ALL('Table 3'),'Table 3'[Score Range]=SELECTEDVALUE('Table 3'[Score Range])))

 

Result:

v-yuaj-msft_0-1607648125515.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
HunterAlpert
Helper I
Helper I

This is exactly what I needed! Thank you!

Hi,

Is it me that you replied to?  If my reply helped, please mark it as Answer.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @HunterAlpert ,

 

Based on your description, you can do some steps as follows.

  1. Create a calculated column to mark the range.

 

Score Range = SWITCH(

    TRUE(),

    [Average Scores]>=90&&[Average Scores]<100,"90-100%",

    [Average Scores]>=80&&[Average Scores]<90,"80-89%",

    [Average Scores]>=70&&[Average Scores]<800,"70-79%",

    [Average Scores]>=60&&[Average Scores]<70,"60-69%",

    "<69%")

v-yuaj-msft_0-1607648062271.png

    2. Create a measure to count filtered rows.

 

Number in column = COUNTROWS(FILTER(ALL('Table 3'),'Table 3'[Score Range]=SELECTEDVALUE('Table 3'[Score Range])))

 

Result:

v-yuaj-msft_0-1607648125515.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

camargos88
Community Champion
Community Champion

@HunterAlpert ,

 

Check this link:

Dynamic segmentation – DAX Patterns



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.