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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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