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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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