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
vincetaylor
Helper I
Helper I

Dynamically Count the number of occurrences of each item

I have a table with names that are added periodically. I would like to count the number of times each name appears in the column and display the information in a table. Each time a name is added, that name should also be added to the table. I would appreciate ideas.

 

This is what the column looks like and next is what the resulting table should look like

 

ColumnColumnTable DisplayTable Display

2 ACCEPTED SOLUTIONS
PhilipTreacy
Super User
Super User

Hi @vincetaylor 

 

Download sample PBIX file

 

Use this measure

 

Measure = CALCULATE(COUNTROWS('Names'), FILTER('Names', 'Names'[Name] = SELECTEDVALUE('Names'[Name])))

 

namecount.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

Drag the name column to a Table visual and write this measure

Count = countrows(Data)

Data is the name of the Table.

Hope this helps.


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

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Drag the name column to a Table visual and write this measure

Count = countrows(Data)

Data is the name of the Table.

Hope this helps.


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

Hi @vincetaylor 

 

Download sample PBIX file

 

Use this measure

 

Measure = CALCULATE(COUNTROWS('Names'), FILTER('Names', 'Names'[Name] = SELECTEDVALUE('Names'[Name])))

 

namecount.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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