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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
smmoore34
Helper III
Helper III

Measure to count the # rows in each category

I have a table with a column heading Munipality  and colums with the address.

I want to have a measure that gives me the # addresses per muncipality.

 

Here is a screenshot: 

smmoore34_0-1703869502296.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@smmoore34  It looks like you created a new table and I'm not sure if you have to, and it looks like the relationship between the new table and existing isn't working. Also, I edited my response and added a second solution that counts the number of cities per municiplaity.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

@smmoore34  Do one of these solutions accomplish what you're looking to?

bchager6_0-1703883106680.png


bchager6_0-1703882364509.png

 

Exactly!  Unfortunatley I still received the same results. 

 

smmoore34_0-1703883641478.png

 

Anonymous
Not applicable

@smmoore34  It looks like you created a new table and I'm not sure if you have to, and it looks like the relationship between the new table and existing isn't working. Also, I edited my response and added a second solution that counts the number of cities per municiplaity.

jdbuchanan71
Super User
Super User

Add Municipality to a table visual along with this measure.

Address Count = DISTINCTCOUNT ( 'YourTable'[Address Field] )

Worked perfectly when I created it as a measure and added it to a table. 

smmoore34_0-1703884510340.png

Thank-you! Happy New Year!

 

Anonymous
Not applicable

You're welcome, and Happy New Year to you too!

Thank you for your quick response. As I understand this, I created another table with just the municipalites.

I added a new column with the formula you listed but it's giving me the total# records. My first table has 42 records and each record contains contains 1 of the 9 municipalites. For example, 5 records contain Town of Newfield, 7 contain Town of Groton etc.  My table should show this count for each municipality.  

smmoore34_0-1703879434352.png

 

 

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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