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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
BudMan512
Helper V
Helper V

Count number of times a name appears in a list

This seems like it should be so easy, but not for me at least.

I need to count the number of times a name appears in a list so I can add another column with the results as shown below. I will use the count for other calculations.

Thanks much!

 

BudMan512_0-1660663255254.png

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@BudMan512 Like:

Count (Column) = 
  VAR __Name = [Name]
RETURN
  COUNTROWS(FILTER('Table',[Name] = __Name))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@BudMan512 Like:

Count (Column) = 
  VAR __Name = [Name]
RETURN
  COUNTROWS(FILTER('Table',[Name] = __Name))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Sorry for the extra messages, when I used the formula with my live data with additional columns, it worked beautifully.  Just what I wanted.

Thanks again,

I spoke too soon 🙂

I got this in the Data view which is what I want.

BudMan512_0-1660683924488.png

But I got this in the Report view which is not what  I want.\

Any way around this?

BudMan512_1-1660684043155.png

Thanks

Thank you Greg, much appreciated!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.