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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
s4spencer
Regular Visitor

Group By Name Then Add Column With Count Of Each Group

Hi,

 

I'm trying to group together names and then get a count of each group, and add the count of the records group to itself (for every row). There's an example below.

I do specifically need it to be a calculated column, and not just filtered with a visual.

 

If I have the following Names

[Name]

A

A

A

B

B

C

 

I want to end up with

[Name] | [Count]

A | 3

A | 3

A | 3

B | 2

B | 2

C | 1

 

Where A is 3 because there's 3 A's, B is 2 and C is 1 for similar reasons.

Anything i've been able to find so far points towards a measure, however the measure changes based on page/visual filters, and requires multiple visuals to manipulate it the way i'm trying to.

 

Any idea's how I can get the desired result?

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

@s4spencer ,

 

Create a new column with:

 

Count = CALCULATE(COUNT('Table'[[Name]]]), ALLEXCEPT('Table', 'Table'[[Name]]]))

 

Capture.PNG

 



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

Proud to be a Super User!



View solution in original post

3 REPLIES 3
camargos88
Community Champion
Community Champion

@s4spencer ,

 

Create a new column with:

 

Count = CALCULATE(COUNT('Table'[[Name]]]), ALLEXCEPT('Table', 'Table'[[Name]]]))

 

Capture.PNG

 



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

Proud to be a Super User!



No idea why I struggled with this so much, many thanks!

Just as a note for anyone who has the same issue and is having "one of those days". Make sure to check that your visuals aren't "summarizing" your counts. Was so convinced I was doing something wrong before I never checked the obvious.

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.