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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
quickwin
Regular Visitor

Count ignores relationship

Hi,

I have users table and cities table with relationship 1-many based on city ID (one city can have many users)

I wanted to have each city the number of assigned users. For that I have created a new column to the Cities table:

Users per city = COUNT('users'[Userid])

As a result, it shows for all cities the same number, which is the total number ALL users disregarding the relationship.

I'm probably missing something the way PBI behaves, and would appreciate any assistant.

10x

1 ACCEPTED SOLUTION
Baskar
Resident Rockstar
Resident Rockstar

Lets cool dude , Try this one 

 

 

Calculate ( COUNT('users'[Userid])) 

 

 

Let me know if it is not helping u .

 

 

View solution in original post

3 REPLIES 3
Baskar
Resident Rockstar
Resident Rockstar

Lets cool dude , Try this one 

 

 

Calculate ( COUNT('users'[Userid])) 

 

 

Let me know if it is not helping u .

 

 

thanks !

u r most welcome 🙂 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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