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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors